Installing PHP under IIS using FastCGI 
The recommended method to use PHP on an IIS server under Windows is using FastCGI. This method allows you to reuse resources similar to an ISAPI module but does not have the instabilities introduced through a multi-threaded PHP installation.

Microsoft has posted instructions on how to install PHP under FastCGI on their IIS.net website. You can see those instructions here:

To install PHP with FastCGI under IIS6 please follow these instructions:
https://learn.iis.net/page.aspx/247/using-fastcgi-to-host-php-applications-on-iis-60/

To install PHP with FASTCGI under IIS7 please follow these instructions:
https://learn.iis.net/page.aspx/246/using-fastcgi-to-host-php-applications-on-iis-70/
porcupine73 07th Jan 2009, 05:25am
Another benefit of running PHP as fastcgi in IIS6 is that you can leave II6 running in 64-bit mode, and just the PHP cgi's will run in *32 bit mode. Otherwise to run PHP as ISAPI in IIS6, you must switch it to 32-bit mode.

Anecdotal perhaps, but I was getting random 500 errors at times running vBulletin on Windows 2003 with IIS6 with PHP running as ISAPI. After switching to fastcgi mode I have had no more such issues.