Installing PHP 5 on IIS in 5 simple steps
Submitted by Dominic Ryan on Wed, 2007-05-02 15:00.
2. Set Your Environment Variables
For this step we'll need to use the Windows GUI, so rather than just write out all the steps I'll use images to do most of the talking.
- Right click on the My Computer icon and select the properties menu item. You should be presented with a window as shown below in figure 1. Select the Advanced tab and then click the Environment Variables button at the bottom.
- Scroll through the System variables list at the bottom until you come to the path variable. Select it and then click the edit button as shown below in figure 2.
- Move to the end of the text in the Variable value field and type in the path to the PHP directory you created earlier in step 1 (e.g. D:\PHP). Make sure that there is a semi colon (;) separating the new value you're entering and the previous one, and also place another semi colon (;) after as shown below in figure 3. Once you have added the path click on the ok button to save it and return to the previous window.
- This time we need to create a new environment variable. From the Environment Variables window click on the New button towards the bottom as shown below in figure 4.
- You should now see the New System Variable window as shown below in figure 5. In the Variable name field type in PHPRC, and in the Variable value field type in the path to your PHP install directory (e.g D:\PHP) as shown below. Once done click the ok button to create and save the variable. This PHPRC variable tells Windows where to look for your php.ini file, and if it doesn't find it there or if this variable is not set then IIS will look though your Windows system path.