PHP – Download and Install
This guide will show you how to install PHP locally on your computer so that you may begin studying PHP.
Installing PHP on your computer allows you to develop and test a web application without having to worry about breaking the live system.
You’ll need the following software to work with PHP locally:
- PHP
- A PHP-compatible web server. The Apache webserver will be used in our examples.
- A database server is a computer that stores data. The MySQL database server will be used.
You won’t usually install all of these applications separately because connecting them is difficult and not recommended for novices.
As a result, finding an all-in-one software package that includes PHP, a web server, and a database server is much easier. XAMPP is one of the most widely used PHP development environments.
XAMPP is an Apache distribution that includes PHP, MariaDB, and the Apache webserver for easy installation. XAMPP is compatible with Windows, Linux, and Mac OS X.
How to Download XAMPP?
Go to the XAMPP official website and download the appropriate version for your platform to install XAMPP on Windows.
How to Install Install XAMPP on Windows?
Just start the setup file from the one you downloaded and follow the step by step instructions.
Troubleshooting PHP installation
Apache’s default port is 80. If another service is using port 80, you’ll 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
In this scenario, you must change the port from 80 to anything other, such as 8080.