How do I get the latest FastCGI and PHP versions to peacefully coexist on IIS 6?

1

I have been going round and round trying to get any sort of PHP running on IIS 6. I somehow managed to successfully get version 5.1.4 running using the php5isapi.dll file. However, I want to upgrade a website to begin using a Content Management System. I have never dug into CMS before so I'm open to programs that are easy to use. I am currently looking into TomatoCMS and ImpressCMS - but that's beside the point.

I have never done an installation with PHP before and I think I'm getting familiar with how it works. However the current situation is this. Microsoft's Web Platform Installer 2.0 installed FastCGI for me. I need to upgrade to PHP 5.3.1 for a CMS system. So I downloaded the Windows installer and let it go at it.

After consulting several other blog articles, I believe I know how it is supposed to work but I am currently not having luck.

THE SETUP

*.php is a registered extension in IIS 6 for all websites (on Win 2k3). The application that it calls is C:\Windows\system32\inetsvr\fcgiext.dll, like it should.

The fcgiext.ini config has the proper lines:

[Types] php=PHP

[PHP] ext=C:\program files\PHP\php-cgi.exe

And the php.ini file also has the correct configs. All extensions are disabled and I changed the correct things for FastCGI. And everything is registered correctly with the PATH variable. Everything is exactly how it should be.

BUT when I launch the "info.php" page () on another computer, I get the following error:

FastCGI Error The FastCGI Handler was unable to process the request.

Error Details:

* Section [PHP] not found in config file.
* Error Number: 1413 (0x80070585).
* Error Description: Invalid index.

HTTP Error 500 - Server Error. Internet Information Services (IIS)

A quick Google search reveals that I have it all setup correctly as far as the INI's go and the mapping of the php extension. I am completely at a loss. Does anyone have any suggestions? Although the server is hosting three small websites, I don't really care what I have to do to it to get it to work.

iis-6
fastcgi
php5
php.ini
asked on Server Fault Jan 30, 2010 by BHelman

1 Answer

0

I had troubles getting FCGI and PHP to coexist peacefully with IIS6 on my server as well, although I had different problems. Based on what you posted from your fcgiext.ini file, it looks like you need slightly different configuration options, namely ExePath needs to be set instead of ext. Here's a snippet from the fcgiext.ini file on my production server hosting several dozen sites:

[Types]
php:633747741=PHP-TEST
php=PHP-Production

[PHP-Production]
ExePath="C:\Program Files\PHP-5.2.10-nts-vc6\php-cgi.exe"
EnvironmentVars=PHPRC:C:\Program Files\PHP-5.2.10-nts-vc6
InstanceMaxRequests=1000
ActivityTimeout=1200
RequestTimeout=1800
MaxInstances=100

[PHP-TEST]
ExePath="C:\Program Files\php-5.2.12-nts\php-cgi.exe"
EnvironmentVars=PHPRC:C:\Program Files\php-5.2.12-nts
InstanceMaxRequests=5
ActivityTimeout=1200
RequestTimeout=1800
MaxInstances=100

I have two different configurations of PHP defined (PHP-Production and PHP-TEST) and I have set the default configuration to be PHP-Production. I have specified for IIS site number 633747741 to use configuration PHP-TEST instead.

answered on Server Fault Mar 8, 2010 by JSmitty

User contributions licensed under CC BY-SA 3.0