2

I installed PHP 5.3.1 VC9 for Windows x86 and selected IIS FastCGI as the target webserver. My system is a 32-bit Windows XP with IIS 6.0. Before this I installed IIS FastCGI extension.

Now when I browse my website I can still see all my old files, but any file with an extension of .php now returns a 404 error, even though the file exists.

Not withstanding the fact that Microsoft products give outright LIES when they provide error responses (a 404 is NOT FOUND, a 500+ is a WEBSERVER ERROR) what can I do to actually run my PHP files through the FastCGI processer in C:\Program Files\PHP\php-cgi.exe as specified in the configuration file C:\Windows\system32\inetsrv\fcgiext.ini:

[Types]
php=PHP

[PHP]
ExePath=C:\Program Files\PHP\php-cgi.exe
InstanceMaxRequests=10000
ActivityTimeout=600
RequestTimeout=600
EnvironmentVars=PHP_FCGI_MAX_REQUESTS:10000,PHPRC:C:\Program Files\PHP\

This is the out-of-the-box configuration from the PHP installer. Clearly it worked because IIS wouldn't start LYING about PHP files existing if it didn't know it had to do something special with those files.

PP.
  • 2,885

1 Answers1

3

Okay through much trial and error I found the problem.

I had to:

  • right click on My Computer, select Manage
  • open up "Services and Applications" -> "Internet Information Services" -> "Web Sites" -> mywebsite (where mywebsite could be "Default Web Site" or whatever my web site is named)
  • right-click on mywebsite and select Properties
  • choose the "Home Directory" tab, select Configuration... button
  • either select the .php extension and choose the Edit... button, or if .php isn't listed then press the Add... button
  • make the Executable C:\WINDOWS\system32\inetsrv\fcgiext.dll, the extension .php, and ensure Verbs are limited to GET,HEAD,POST, check the "Script engine" and "Verify that file exists" check boxes
PP.
  • 2,885