Run PHP application on IIS6

Run php on IIS have 2 methods

1. You can use ISAPI Filters

2. PHP via FastCGI <- this post is how-to use FastCGI run PHP on IIS.

IIS6 do not build-in FastCGI so need to install afterward
FastCGI Extension for Internet Information Services 6.0 and 5.1

Then in IIS6 Web Services Extensions “Add a new Web services” I call it PHP via FastCGI
and it Required files “C:PHPphp-cgi.exe” (If you unzip the php files to C:PHP)

Then Under Web Sites –> right click –> Properties
Under Home Directory tab click “Configuration” button
Under Application extensions “Add” Executable: “C:PHPphp-cgi.exe”
Extensions: “.php”

After setup the IIS, now we need to configure the php.ini file

Under Paths and Directories section

doc_root =
user_dir =
extension_dir = “C:PHPext”
cgi.force_redirect = 0
cgi.fix_pathinfo=1
fastcgi.impersonate = 1;
File Uploads section
upload_tmp_dir = “C:temp” ;make sure the Internet guest account have read and write on the C:temp folder

Dynamic Extensions section

do not enable the extensions the first time, make sure the php can run under the IIS first, then make sure you install the appropriate DB with the correct dll, then come back and enable the right extension.