Like MySQL, PHP also has an installer, but in order to demonstrate exactly how PHP integrates with IIS, we will be installing PHP manually.
1. Download the latest stable Windows Binaries from: http://www.php.net/downloads.php Download both the PHP 5.x.x zip package and Collection of PECL modules for PHP 5.x.x.
2. Extract the PHP zip package (not the PECL) to: C:\PHP .
3. Extract the PECL modules to: C:\PHP\ext . It is not necessary to even use the PECL modules, but it is nice to have in case you want to use or play with these.
4. Define the PHP directory in the registry.
If you've ever had to copy your php.ini or PHP libraries to your Windows directory, then you will really appreciate this step. The PHP executable needs to know where PHP is installed to find the php.ini file and dependant libraries. By defining the PHP path in the registry, we can keep ALL PHP related files in the PHP directory.
Create a registry key: HKEY_LOCAL_MACHINE\SOFTWARE\PHP
Add a new string name: IniFilePath
The value will be the path: C:\PHP
If you do not know how to use regedit or just want an easy way to do this, copy the following code into a text editor and save it as php.reg. Then you can double click it to install the registry key.