HOW TO INSTALL AND RUN PHP PROJECTS IN UBUNTU OR LINUX OPERATING SYSTEMS
what is a PHP language?
Php stands for hypertext preprocessor and it is object oriented and scripting
language which is fast and flexible mainly used as backend in web
development.
Php is a open source language and has so many projects under it such as
wordpress, Facebook, Wikipedia
Tumblr, Slack, MailChimp, Etsy and so many websites and projects are present.
Php has to be run in server as it is backend and work only on server that's
why one has to use server to run php pages, website and language.
Go to the website by clicking on Xampp server and you have to choose the operating system as linux and you will get
latest version of php along with MariaDB, and perl language.
Now follow the following steps to install
Installation commands for xampp
cd ~/Downloads/
chmod 755 xampp-linux-*-installer.run
sudo ./xampp-linux-*-installer.run
sudo chmod -R 777 /opt/lampp/htdocs
sudo a
creating command to start the server without command usage repeatedly
nano ~/.bashrc
add below code in bashrc file
#activate xampp
alias xampp="sudo /opt/lampp/xampp start"
xampp
after it when you want to want to use php activate the server by typing the
command xampp in terminal and you will be
prompt for password of super user type the password it will automatically start
the xampp server to work with php project.
One has to place the projects in " /opt/lampp/xampp " directory as it is the
entry point of the xampp server .
If you want to run the project go to any browser of your choise type https://localhost/<project-name> and you will land in
that website and now you can run php pages in it.
If you try to the php project from any other directory you will only see the
html pages and php pages will not work and not even respond.
0 Comments
If you have any doubts or any topics that you want to know more about them please let me know