NOTE: I'll assume the following in the instructions:
* Windows NT is installed in C:\WINNT
* Your IIS webroot is at C:\INETPUB\WWWROOT
* You have decompressed the PHP files to C:\PHP
* You will use the extension .PHP for your PHP files [Others use extensions like .PHTML, .CGI, .PHP4, etc.]
Adjust accordingly.
____________________________________________________________
1. Download the PHP .zip file from
www.php.net or
www.zend.com.
____________________________________________________________
2. Decompress the contents of the .zip file to the directory C:\PHP.
____________________________________________________________
3. Move the MSCVRT.DLL and PHP4TS.DLL files in C:\PHP to C:\WINNT\SYSTEM32.
____________________________________________________________
4. Copy C:\PHP\PHP.INI-DIST to C:\PHP\PHP.INI, then move C:\PHP\PHP.INI to C:\WINNT\PHP.INI.
____________________________________________________________
5. Modify C:\WINNT\PHP.INI so that the information contained in it reflects your environment. This will require reading through the PHP.INI file and learning what the various parameters mean, but for starters find and modify the following:
doc_root = "C:\INETPUB\WWWROOT"
extension_dir = "C:\PHP"
Later, as you become more familiar with PHP, be sure to go back to C:\WINNT\PHP.INI and look at sections such as
...
[mail function]
...
[Sessions]
...
and modify them accordingly so that you can start using some of the cooler features in PHP.
____________________________________________________________
6. Run the MMC.
____________________________________________________________
7. Right-click on the webserver you wish to have PHP support added to.
____________________________________________________________
8. Select Properties from the popup menu.
____________________________________________________________
9. In the dialog box that appears (which has 2 rows of tabs), click on the "ISAPI Filters" tab and make sure you do NOT have a filter in place that uses the php4isapi.dll file. If there are any, delete them.
____________________________________________________________
10. Click on the "Home Directory" tab, then click on the [Configuration...] button.
____________________________________________________________
11. Click on the "App Mappings" tab and see whether you have a mapping for the extension ".php".
____________________________________________________________
12. If the mapping already exists, click on that mapping to select it and click the [Edit] button. If the mapping does NOT yet exist, click the [Add...] button.
____________________________________________________________
13. In the dialog box that comes up, be sure that it reads
+-------------------------------------------------
| 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]
+-------------------------------------------------
____________________________________________________________
14. Click [OK] 3 times to save the changes you have just made. You can now exit the MMC.
____________________________________________________________
15. Though not absolutely necessary, if possible, reboot NT or shutdown/restart the w3svc (using "net stop iisadmin" and "net start w3svc" from a Command Prompt).
At this point, your box should be configured for PHP. To test, create a file called C:\INETPUB\WWWROOT\TEST.PHP which reads
<?
phpinfo();
?>
and then view it in your browser by entering
http://site/test.php
where "site" is either the IP address of the NT box, it's DNS name, or the word "localhost" if you are using a browser on the same box.
This should generate a page full of information on the installed version of PHP.