This article will walk you through installing PHP on IIS 7.0. Please note that this article only addresses the actual install of PHP using the FastCGI protocol. For more information on FastCGI, see the official Microsoft IIS site here.
- Before we do anything else, we need to install FastCGI by going to Server Manager - Roles - Right click Web Server (IIS) and click Add Role Services...
- Here we'll check CGI under Application Development (click Next - Install - Close to finish)
- Once added, it's important that we update the FastCGI module. Click on one of the following links:
Windows Server 2008 x86
Windows Server 2008 x64
Install PHP Support
- Download the latest non-thread safe installer package of PHP from here
- Choose IIS FastCGI - Next
- Click on all three options (Script Executable, Extensions, Extras) and choose Will be installed on local hard drive - Next
- To test the install, open a command prompt and change to your PHP directory, then run:
You should see something similar to this:
- Once you've verified PHP is installed, we'll want to test it out. To do this, open up notepad and enter the following:
<?php phpinfo(); ?>
- Save this new file as phpinfo.php in your websites default directory
- Now browse to localhost/phpinfo.php If everything is set up correctly, you will see something similar to the following:
Congratulations, you have successfully installed PHP in IIS!
© 2011-2013 Rackspace US, Inc.
Except where otherwise noted, content on this site is licensed under a
Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License
See license specifics and DISCLAIMER