Post date: Sep 20, 2010 2:43:32 AM
This is documented for posterity. I have found PHP5 by itself, and XSLT on Windows Vista but (so far), not much on Win 7 (though I could be wrong the Internet being such a wide place).
I used this site for my initial download.
http://www.howtoforge.com/node/297
For Win7, what it is short off is the ISAPI and Handler setups that need to be done. So I am going to start from scratch but with a little difference.
Download
1. Download the windows version of PHP from http://www.php.net/downloads. Note: download BOTH the .exe and the .zip package (downloading the .zip package so you can get all the files in one fell swoop and not need to bother about re-running the php setup program)
2. Execute the .exe version and install the PHP into c:\php or d:\php or whatever your disk letter is.
3. Unzip the .zip version of PHP and then copy overwrite all the files in the c:\php folder. Again this is to enable you to easily include different extensions.
Edit php.ini
4. Make a copy of php.ini in your php directory, just in case something goes wrong somewhere.
5. Edit php.ini using something like Notepad. Find the line and change it from
extensions_dir = "./"
to
extensions_dir = "c:\php\ext\"
Save and Close the php.ini.
Setup Environment variables
6. Go to Computer anywhere on the desktop, right-click on it and select Properties.
7. In the dialog, click on Advanced system settings, then click on the Environment Variables button.
8. In the System variables scroll area, look for the variable Path. Select Path and click on the Edit button. Ensure that "c:\php;c:\php\ext" is in the Path variable.
9. Back in the Environment variables dialog, click on the New button and add the new variable name PHPRC with variable value "c:\php".
10. Exit the Advanced system settings.
Setup IIS Manager
11. In Control Panel (under System and Security if you are on the view by Category option), choose Administrative Tools, then click on Internet Information Services (IIS) Manager.
12. On the left pane, choose the computer you are administering (I only have one so I don't know if there will be any issue otherwise).
13. In the middle pane, choose ISAPI and CGI Restrictions. Ensure that you have the following row defined.
Under Description : PHP
Under Restriction : Allowed
Under Path : c:\php\php5isapi.dll
Then exit this screen and go back to the IIS Manager main window by clicking on the Back arrow on the top left.
14. In the middle pane, choose Handler Mappings. Ensure that you have the followin row defined.
Under Name : PHP
Under Path : *.php
etc. etc.
Select this row and click Edit (or Add if you don't have this entry)... Under the form, there should be an Executable with the value "c:\php\php5isapi.dll"
Then exit this. The setup work is done.
Different extensions
Nothing above shows what to do for the different extensions. To do that edit the php.ini file.
For XSLT, look for
;extension=php_xsl.dll
and merely remove the ; to
extension=php_xsl.dll
Save and Exit.
The same thing can be done for different extensions.
Finally, close all Windows, and restart your PC.