Install PHP – Set Up PHP on Your Own PC
However, if your server does not support PHP, you must:
- install a web server
- install PHP
- install a database, such as MySQL
The official PHP website (PHP.net) has installation instructions for PHP: http://php.net/manual/en/install.php
- Web Server − PHP will work with virtually all Web Server software, including Microsoft’s Internet Information Server (IIS), NGNIX, or Lighttpd etc. The most often used web server software is the freely available Apache Server. Download Apache for free here − https://httpd.apache.org/download.cgi
- Database − PHP will work with virtually all database software, including Oracle and Sybase but most commonly used is freely available MySQL database. Download MySQL for free here − https://www.mysql.com/downloads/
- PHP Parser − In order to process PHP script instructions a parser must be installed to generate HTML output that can be sent to the Web Browser.
Follow the below steps and install the XAMPP server on your system.
Step 1: Click on the above link provided to download the XAMPP server according to your window requirement.
Step 2: After downloading XAMPP, double click on the downloaded file and allow XAMPP to make changes in your system. A window will pop-up, where you have to click on the Next button.
Step 3: Here, select the components, which you want to install and click Next.
Step 4: Choose a folder where you want to install the XAMPP in your system and click Next.
Step 5: Click Next and move ahead.
Step 6: XAMPP is ready to install, so click on the Next button and install the XAMPP.
Step 7: A finish window will display after successful installation. Click on the Finish button.
Step 8: Choose your preferred language.
Step 9: XAMPP is ready to use. Start the Apache server and MySQL and run the php program on the localhost.
How to run PHP programs on XAMPP, see in the next tutorial.
Step 10: If no error is shown, then XAMPP is running successfully.