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 website. You can see those instructions here:

To install PHP with FastCGI under IIS6 please follow these instructions:

To install PHP with FASTCGI under IIS7 please follow these instructions:
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.