PHP Installation on Windows IIS:
Download the latest version of PHP in ZIP and MSI formats.
You are prompted for a choice of extensions you wish to use, but in the event that you want to add something later, the ZIP file is easy to grab them from. You MUST use the same version of extension as the version of PHP you installed. Store these files somewhere as a backup.
Install the Windows MSI installer to 'C:\PHP\'
If you use the default 'C:\Program Files\PHP\' directory, you have to use the special 8-character file path naming convention within the 'php.ini' file. It would read: 'C:\PROGRA~1\PHP\', which is a pain. It's easiest to use a shorter path.
Extract the Windows ZIP version to a temp folder.
From here, you can select any extensions you require... such as 'php_mysql.dll'.Take desired DLL files from the zip and put them in 'C:\PHP\ext\'
If this path doesn't exist, create it. It will make life easier when you need to see what you have already running. This path will need to be referenced in the 'php.ini' file.Add 'C:\PHP\' to the Windows PATH information and add 'C:\PHP\' as a new variable called 'PHRC'.
The 'PHRC' variable points to where PHP will look for it's 'php.ini' configuration file. You COULD dump that file in 'C:\WINNT\' and reference to it there, but in the interests of upgradeability, it's best to keep ALL your PHP files in one place.
The below image is of the default install. You just need to edit the variable accordingly.
Add 'IUSR_Servername' to 'C:\PHP\php-cgi.exe' and then grant 'Read' and 'Read & Execute' permissions.
This step is the equivalent of setting read permissions on a UNIX host, except in the Windows world you use the in-built 'Internet User' account. Without these permissions, your PHP installation will not work.
Add 'IUSR_Servername' to 'C:\PHP\sessiondata\' and 'C:\PHP\uploadtemp\' then grant 'Read', 'Read & Execute', 'List Folder Contents' and 'Write'.
PHP stores session data and temp information in these two folders. Again, they can be anywhere, as long as you reference them in the 'php.ini' file... but as I said before, it's easiest to keep them in one place. The Internet User account on your server requires write access to these folders.
Edit 'C:\PHP\php.ini' in Notepad or Wordpad.
session.save_path= C:\PHP\sessiondata upload_tmp_dir = C:\PHP\uploadtemp extension_dir = C:\PHP\ext\ cgi.force_redirect = 0
Take the semi-colon off any DLL's you wish to use.
;extension=php_mysql.dll
becomes
extension=php_mysql.dllEnable PHP on your IIS website.
IIS needs to be told what to do when it comes across a .php file. Add the extension and point it to the 'php-cgi.exe' file, which is the PHP command-line exe. You could use the 'phpisapi.dll' instead, if you installed that version of PHP, or you could take that file out of the downloaded ZIP file to use.
Website - Right-click, Properties. Home Directory, Configuration. Add .php and path.
Add PHP files to the Document list.
You'll probably want to add the .php extension to the list of automatically rendered documents. This is in the 'Documents' tab in the previous picture. Add 'index.php' to the list, and put it in the order of priority you wish.Test your PHP installation!
The easiest and quickest way is to host a php file... might as well make it a useful one! Copy and paste this code into a file called 'info.php' and host it in the root of your web share. Navigate to it with a web browser in the form of: http://localhost/info.phpphpinfo(); ?>