Installing PHP on IIS 6 on Windows operating system
Installing PHP on IIS 6 is easy to do and takes only a couple minutes to setup.
This guide assumes that IIS6 is already installed
I always recommend grabbing the the zip package for Windows over the installer since you have more control over the setup and can actually learn how it all works.
There are three ways to setup PHP on windows cgi, ISAPI and FastCGI in our guide we will be installing IIS as a ISAPI setup.
Step 1
Go to http://www.php.net/downloads.php and grab the zip package.
Download the zip package and extract the zip file
Extract the files to C:\php make folder php if it does not exist and copy all the php files inside it.
Step 2
Create a folder in the PHP folder called uploads
c:\php\uploads
Right click on the uploads folder and go to properites.
Next, click on the security tab and add IUSER_YOURCOMPUTERNAME here to the folder and give it full permissions
Next create a sessions folder in the php directory
c:\php\sessions
Right click on the sessions folder and go to properites.
Next, click on the security tab and add IUSER_YOURCOMPUTERNAME here to the folder and give it full permissions
Step 3 - Setting up the php.ini file
Copy php.ini to your c:\windows folder
Next we need to update a couple paths
Update extension path:
Update uploads path:
Upload sessions path:
Next we need to update which modules we want installed
Step 4 - Copy the dll files
Copy php5isapi.dll to your system32 folder
Step 5 - Setup PHP in IIS
Open up IIS
Step 6 - Test PHP
Create a file in your website normally under c:\inetpub\wwwroot\
Create a file called test.php
Inside this file place the following code
phpinfo()
?>
Now visit this page in your browser normally http://127.0.0.1/test.php
If installed correctly you should see the PHP configuration detail page with all the modules that are installed.
Other notes if you make a change in your php.ini using ISAPI you will need to restart IIS in order for the changes to take affect