Install PHP on Windows, Linux and Mac OS X

Admin   PHP   574  2020-09-07 23:28:56

In order to develop and run PHP pages, the following 3 basic components need to be installed on your computer system.

Web Server - PHP will work with almost all Web Server software, including Microsoft's Internet Information Server (IIS), but then Apache Server is more commonly used. Download Apache for free from:

Database - PHP will work with almost all Database software, including Oracle and Sybase, but then MySQL Database is used most commonly. Download MySQL for free at:

PHP Parser - To process PHP script commands, a parser must be installed to generate HTML output that can be sent to the web browser. The following section will guide you on how to install PHP Parser on your computer.

Install PHP Parser

Before learning PHP, it is important that you make sure you have the correct environment installed on your computer for web development using PHP.

Type the following into the address box of your browser:

If it shows a page that shows information regarding your PHP settings, then you have PHP and WebServer installed correctly. Otherwise, you must follow the following procedure to install PHP on your computer.

Here are the steps to install and configure PHP through the following four platforms:

Install PHP on Linux or Unix with Apache

Install PHP on Mac OS X with Apache

Configure Apache

Below will guide you to edit Apache Configuration Files while you are using Apache as a Web Server:

You go to: Configure PHP in Apache Server

Configure PHP.INI File

The PHP Configuration file, php.ini, is the last and most direct way to use PHP's features.

You access: Configure PHP.INI File

Configure Windows IIS

To configure IIS on Windows, refer to the IIS Reference Manual included with IIS.