Archive

Posts Tagged ‘Windows 2003’

64bit FastCGI installation and troubleshooting on 32bit IIS

26 November 2009 Leave a comment

This is just a short post for some of the guys out there going through what I went through today.

When following the post on the iis.net website for installing and configuring FastCGI for IIS they forgot to mention tiny little details, well, for when you are installing it on a Windows 2003 64bit machine that is running 32bit IIS.

When following their guide, please note that they misspelled the name of the fcgiext.ini (fcigext.ini).  This caused a bit of confusion as to whether mine was right.

So, to install FastCGI on a 64bit platform that is running IIS in 32bit:
Note: replace values as per your setup

  1. Download the x64 FastCGI from http://www.iis.net/extensions/fastcgi
  2. Install FastCGI
  3. Setup your PHP to run as CGI (Not going through all this here); MAKE SURE IT WORKS!
  4. Change to %WINDIR%\system32\inetsrv in command prompt
  5. Run: cscript fcgiconfig.js -add -section:"PHP" -extension:php -path:"C:\PHP\php-cgi.exe"
  6. Copy fcgiext.ini from %WINDIR%\system32\inetsrv to %WINDIR%\sysWOW64\inetsrv
  7. Create a script map for .php to %WINDIR%\SysWOW64\inetsrv\fcgiext.dll in inetmgr
  8. Add %WINDIR%\SysWOW64\inetsrv\fcgiext.dll to the FastCGI Handler in web service extensions; Default is from %WINDIR%\system32\inetsrv

Steps 6 and 8 were “kindly” left out by the iis.net website explaining how to install it and that was where my problems crept in.

Here are some errors I encountered and the cause:

Page not found (404)
IIS cannot access fcgiext.dll; check permissions, that path/file exist (quotes around it if it contains spaces) and the it is allowed in the web service extensions in IIS (check required files, make sure it’s WOW64 one as well as system32)

FastCGI Error – File not found (500)
FastCGI cannot access one of the files it requires; make sure the %WINDIR%\SysWOW64\inetsrv\fcgiext.ini file exists and that its contents point to your php-cgi.exe path and file (double check spelling)

Note: Windows is running 64bit apps from system32 and 32bit apps from sysWOW64.

I found this page just now, will help you if you require a more advanced setup: http://technet.microsoft.com/en-us/library/dd450377(WS.10).aspx

Hopefully this would be sufficient to help someone.

Advertisements