Hey,
I just got done dealing with that nightmare myself. You'll need the full download from http://php4win.de (or a site like it). Make sure you don't get the "dev" versions of them... 4.0.7 sucks! Once you have that downloaded and unzipped (into c:\php if you want things to be easy), just copy the php4ts.dll and all the files in the DLL directory to your c:\windows\system folder. You'll also need to add a key to your registery file. Use note pad and cut and paste the following into it (save it as "phpinit.reg":
-----cut here------
REGEDIT4
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\w3svc\parameters\Script Map]
".php"="C:\php\sapi\php4isapi.dll"
-----end of cut-----
Once you have that file saved just double click on it and add that to the reg. All these files assume that you have unziped the PHP into C:\php if you put it somewhere else, make sure you reflect that in these files.
Now for the last part, edit the php.ini file you'll have to rename it, there will be two that come default with this version of PHP4.x.x the one you want to rename and use is named "php.ini-dist" just rename it php.ini. Edit this file and remove the ";" infront of the line that reads "extensions=php_gd.dll", and also change the line that reads "extension_dir =" and make sure that it points to "c:\php\extentions".
That's it, reboot and it should be ready to rock and roll. 🙂
Hope that helps,
Matt