0% found this document useful (0 votes)
2 views

PHP_Execution

This document provides a step-by-step guide on how to run a PHP file in Ubuntu using XAMPP. It includes instructions for checking server status, starting servers, changing folder permissions, creating a PHP file, and accessing it through a web browser. The guide also offers troubleshooting tips and a contact email for assistance.

Uploaded by

pardhukoneru123
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

PHP_Execution

This document provides a step-by-step guide on how to run a PHP file in Ubuntu using XAMPP. It includes instructions for checking server status, starting servers, changing folder permissions, creating a PHP file, and accessing it through a web browser. The guide also offers troubleshooting tips and a contact email for assistance.

Uploaded by

pardhukoneru123
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Running a php file in ubuntu through XAMPP

Step-1:
First of all we have to open Xampp control panel for checking servers status.
To do it , open your terminal and enter the below command:

sudo /opt/lampp/manager-linux-x64.run

Then you have to enter your password.


After that , the Xampp control panel will appear on screen like this.

Step-2 :
Now Check server’s status at ‘Manage Servers’

If serever’s are running then you will see like this:


Running a php file in ubuntu through XAMPP

Step-3:
If the servers are not running then click on ‘start all’

Then minimize the Xampp control panel window (!Don’t close it).
After starting the servers Press ‘ctrl+c’ on terminal to get access on it.

Step-4:
Now you have to get permissions for accessing folders in path : ‘/opt/lampp/htdocs’ on your
computer’s ‘Other Locations’ .

In the terminal , Enter the below command :

sudo chown -R UserName:UserName /opt/lampp/htdocs

(my UserName)

It will give you access to the specified folders.


Running a php file in ubuntu through XAMPP
Step-5:
In that folder we have to create a new file with ‘.php’ extension like this :

(path is important and don’t change any other files.)

Step-6:
Right click on the newly created file and open it in your coding platform.

Step-7:
Write your code in this file and save it by pressing ‘ctrl+s’.

Step-8:
Now open your browser and in the search bar enter ‘http://localhost/dashboard/’ to check
your Xampp is running or not.

If it is running you’ll get a website like this


Running a php file in ubuntu through XAMPP

If it is not running then do Step-1 and Step-2.

Step-9:

After that replace the ‘/dashboard/’ part in the search bar with your file name as shown
below:

Then you’ll get the output for your code which was written in given file.

If you get stuck , feel free to contact us at:


[email protected]

You might also like