Harry,
I just saw your message and something struck me. I'm guessing you configured PHP via the Microsoft Management Console (MMC) by doing the following, am I correct? [By the way, I have PHP4 running on 2 boxes, both running NT4 SP5 & IIS 4 and have gotten a bit familiar with the ins and outs of configuring PHP on IIS.]
- Running MMC
- Right-clicking on your webserver and selecting Properties from the popup menu.
- Clicking the "Home Directory" tab
- Clicking the [Configuration...] button
- In the "App Mappings" tab section, you added a mapping for the file extension you use for your PHP scripts (I use .php, but others use .phtml, .php3, etc.).
Now here's what I'd like to know: How EXACTLY did you configure the mapping? In other words, assuming you decompressed the PHP distribution files to C:\PHP (I'm going to assume the drive letter here), does your setup look like the following?
+-------------------------------------------------
| Add/Edit Application Extension Mapping
+-------------------------------------------------
| Executable: C:\PHP\php4isapi.dll
| Extension: .php
| Method Exclusions:
| [x] Script engine
| [x] Check that file exists [OK] [Cancel] [Help]
+-------------------------------------------------
or does it look like this?
+-------------------------------------------------
| Add/Edit Application Extension Mapping
+-------------------------------------------------
| Executable: C:\PHP\php.exe %s %s
| Extension: .php
| Method Exclusions:
| [x] Script engine
| [x] Check that file exists [OK] [Cancel] [Help]
+-------------------------------------------------
Note the ISAPI module does NOT have the ... %s %s... business, and even the .EXE version does NOT have quotes around the %s's. This is important.
Also, if you are using the ISAPI module, did you in the Properties for the webserver click on the "ISAPI Filters" tab and add a filter called PHP which also contained the path to the php4isapi.dll file (with NO %s %s either)?
Final notes (and please excuse these comments if they are too obvious, but I've found many people, including myself, at times falling prey to the simple things):
Are you loading your PHP scripts thru the webserver as opposed to locally from the HD? (e.g., loading http://yourwebsite/phpfile and not C:\wwwroot\phpfile, which doesn't work)
Are you PHP scripts in files with extensions which are in the App Mappings? (e.g., no good having your PHP scripts in files like myscript.PHP if you set the App Mapping for .PHP3)
Note the checkbox above "[x] Check that file exists" is not checked by default in IIS, but it is handy to do so, as it avoids the webserver giving detailed information in error messages when someone lists a URL to an invalid PHP file, such as http://yourwebsite/doesnotexist.php, but rather gives the 404 error, which is more appropriate. Just a suggestion.
The win32 version of PHP4 still needs a little work, even when you DO have it setup and working. Basic PHP scripts should work fine, but the session handling features still have kinks. So don't get disheartened if you have problems even when it's working. In many cases it IS user-error, but at times you will have things not work and it may be due to bugs that are still being worked on. Be sure, once you're up and running, that if you have serious trouble getting something to work, to check the appropriate sites (PHP Builder, PHP.NET's bug database, etc.) for possible insight into whether it's you or the engine.
Hope this was of some help. If not, please provide more details of your config and we'll see if we can't get things working.