The following simple tutorial is intended to help you setup PHP on a Windows machine running IIS (7.0 or higher in this example).
Install IIS Including the CGI ModuleIf you haven't already installed IIS, you will have to do so. If you have installed IIS but have not installed the CGI module, you must do so. Go to Start Button -> Control Panel -> Programs and Features -> Turn Windows features on or off (left hand side). Select the following features.
Download PHPYou first must download PHP to your computer. Get the latest non-thread-safe version. If installing on IIS 6 or older, you will download the thread safe version.
Install PHPYou can install PHP wherever you like. I prefer the following path:
Extract the download PHP folder and files. The PHP files (ex: php-cgi.exe should be in the directory below).
Update Your IIS Hanlder Mappings to Handle .php FilesGo into IIS and click on the server root (above Sites and Application Pools). Click the Handler Mappings icon,
Click the Add Module Mappings link.
Update the Add Module Mapping popup to look like the following (with your specific executable path).
Create a Test SiteTo test if the installation is correct, create a new IIS site. In the root of the site, create a file named index.php. Update the file with the following content:
<? php phpinfo();
Navigate to Your New PHP PageNow that you have a new site setup and a php page created, navigate to it. You url might look something like the following:
If everthing worked, the page should look like this.
*IssuesIf you have trouble accessing your new site and page, you may need to update Windows security settings on the root directory of your site.