Here's how I successfully installed PHP 5.2 with my IIS 5.1:
1) Install with the option: "IIS 4+ / ISAPI"
2) Install under folder "C:\PHP\"
3) Edit the file: "C:\WINDOWS\php.ini"
Change "doc_root = " to "doc_root = c:\inetpub\"
4) Open IIS, right click on home page, properties.
Click "home directory" tab.
Click Configuration, look for the extension ".php".
The executable path should be "C:\PHP\php5isapi.dll"
5) Restart IIS.
Enjoy. I had to learn the hard way. Took me 2 days.