That's a pretty out of date blog entry and life has moved on substantially since then. So forget everything you read on that page :)
1. Download PHP:
Download the latest stable version of PHP for windows. In this case download the PHP 5.3.6 x86 Non Thread Safe zip file (note: the version number may change as the PHP team release new stable binaries):
http://windows.php.net/download/
http://windows.php.net/downloads/releases/php-5.3.6-nts-Win32-VC9-x86.zip
Extract the contents of the zip file to a folder called C:\PHP
so that in this folder you have the following subfolder structure:
C:\PHP\dev , C:\PHP\ext , C:\PHP\extras, etc
Rename one of the php-*.ini
files to php.ini
and edit according to any requirements you may have.
2. Install/Configure Microsoft's FastCGI Extension for IIS5.1/6.0:
Install Microsoft's IIS6 FastCGI extension which can be downloaded from here:
http://www.iis.net/download/fastcgi
Once installed, edit C:\Windows\System32\InetSrv\fcgiext.ini
so that it contains only the following:
[Types]
php=PHP
[PHP]
ExePath=C:\PHP\php-cgi.exe
3. Configure IIS PHP Scriptmap:
Edit or add the .php
scriptmap to your chosen website (or you can add globally) by right clicking on the site and choosing properties:
Choose the Home Directory
tab and click Configuration
:
Click Add
(or if you still have the .php
scriptmap listed, then remove it and re-add).
You need to populate the Executable and Extension fields with these values:
Executable: C:\WINDOWS\system32\inetsrv\fcgiext.dll
Extension: .php
Click OK and save these changes.
4. Configure PHP FastCGI Settings in PHP.INI:
Open C:\PHP\php.ini
in an editor and locate and configure these settings:
fastcgi.impersonate = 1
cgi.fix_pathinfo = 1
cgi.force_redirect = 0
date.timezone = Europe/London ; (http://uk3.php.net/manual/en/timezones.php)
It seems you need to set the timezone now for the phpinfo();
page to render properly, but it's a good idea to set this anyway.
5. Test PHP:
Create a file called test.php
with the following:
<?php
phpinfo();
?>
Browse to this page and if all is good you should see:
After that it's all up to you to fine tune your configuration such as deciding which extensions to use and so on.
After Thoughts:
Depending on how your system is set up you may need to adjust the permissions on the C:\PHP
folder. If it's a pretty stock installation and your sites are running in application pools using the Network Service account and you're using the generated IUSR_<MACHINE_NAME>
anonymous account then you shouldn't need to change anything.