KEMBAR78
2 Installing PHP | PDF | Php | Web Server
0% found this document useful (0 votes)
25 views7 pages

2 Installing PHP

This document provides a step-by-step guide for installing PHP using the XAMPP development environment, which includes PHP, Apache, and MySQL. It outlines the necessary software components, installation steps, and troubleshooting tips for common issues like port conflicts. The guide is aimed at beginners to facilitate local web application development without affecting live systems.

Uploaded by

harleensingh985
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views7 pages

2 Installing PHP

This document provides a step-by-step guide for installing PHP using the XAMPP development environment, which includes PHP, Apache, and MySQL. It outlines the necessary software components, installation steps, and troubleshooting tips for common issues like port conflicts. The guide is aimed at beginners to facilitate local web application development without affecting live systems.

Uploaded by

harleensingh985
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Installing PHP

Installing PHP on your computer allows you to safely develop and test a web
application without affecting the live system.

To work with PHP locally, you need to have the following software:

• PHP
• A web server that supports PHP. We will use the Apache webserver.
• A database server. We will use the MySQL database server.

Typically, you will not install all this software separately because connecting them is
tricky and not intended for beginners.

Therefore, it is easier to find an all-in-one software package that includes PHP, a web
server, and a database server. One of the most popular PHP development environments
is XAMPP.

XAMPP is an easy install Apache distribution that contains PHP, MariaDB, and
Apache webserver. XAMPP supports Windows, Linux, and macOS.

Download XAMPP

To install XAMPP on windows, you can go to the XAMPP official website and
download the suitable version for your platform.

Install XAMPP on Windows

To install XAMPP on Windows, you can follow these steps:

Step 1. Start the installation

Double-click the downloaded file to start setting up XAMPP:


Step 2. Select components to install

Select the components that you want to install. In this step, you can select Apache,
MySQL, PHP, and phpMyAdmin, deselect other components like the following, and
click the Next button to go to the next step.

Step 3. Specifying the installation folder

Select a folder to install XAMPP. It is recommended to install XAMPP in the c:\xampp


folder. Click the Next button to go to the next step.

Step 4. Selecting a language

Select a language for XAMPP Control Panel. By default, it’s English. And you can
select your preferred language and click the Next button to go to the next step.
Step 5. Bitnami for XAMPP

Feel free to skip this step because you do not need Bitnami for learning PHP. Just click
the Next button to go to the next step.

Step 6. Begin installing XAMPP

And you are now ready to install XAMPP. Click the Next button to start the
installation. It will take a few minutes to complete.
Step 7. Completing the XAMPP setup

Once completed, the XAMPP setup wizard shows the following screen. You can click
the Finish button to launch the XAMPP Control Panel:

Step 8. Completing the XAMPP setup

The XAMPP Control Panel lists installed services. To start a service, you click the
corresponding Start button:
The following shows the Apache web server and MySQL are up and running. The
Apache web server listens on the ports 80 and 443 while the MySQL listens on port
3306:

Step 9. Launch the XAMPP

Open the web browser and navigate to the following URL: http://localhost/. If the
installation is completed successfully, you will see the welcome screen of the XAMPP.

Troubleshooting

By default, Apache uses port 80. However, if port 80 is used by another service, you
will get an error like this:

Problem detected!
Port 80 in use by "Unable to open process" with PID 4!
Apache WILL NOT start without the configured ports free!
You need to uninstall/disable/reconfigure the blocking application
or reconfigure Apache and the Control Panel to listen on a different port
Code language: plaintext (plaintext)

In this case, you need to change the port from 80 to a free one, e.g., 8080. To do that,
you follow these steps:

First, click the Config button that aligns with the Apache module:

Second, find the line that has the text Listen 80 and change the port
from 80 to 8080 like this:

Third, click the Start button to start the Apache service. If the port is free, Apache
should start properly, as shown in the following picture:
In this tutorial, you have learned step by step how to install the XAMPP PHP
development environment on your computer.

You might also like