Installing PHP on IIS7

I have been able to get subtext to work locally pretty easily as it uses the .net framework, but what if you wanted to play around with blog engines like wordpress or drupal on your local PC?

Answer install PHP on your IIS installation.

After searching a bit on the net I came across a blog on blogs.iis.net then went through the install of PHP on IIS 7.

I was suprised at how easy it was, here is what I did to get PHP working on Vista/IIS 7:

If you have not done so already install IIS, include ISAPI Extension component (for PHP-ISAPI) or the CGI component (if you prefer CGI).

  1. Download PHP from http://php.net/downloads.php (I downloaded the Zip file)
  2. Extract the files to your drive (I extracted to C:\php\)
  3. Copy c
  4. c:\php\php.ini-dist to c:\windows\php.ini
  5. Open IIS Manager
  6. Click "Handler Mappings"
    php1
  7. Click on the "Add Script Map" in the Actions list in the left hand menu
    php4
  8. Fill the dialog box with the following details:
    php2
  9. I answered yes to the following message
    php3
  10. Then that is you you, PHP will now work on your Vista PC running IIS 7.

The next thing for me to do is to try and get MySQL running so I can have a local copy of Wordpress and or Drupal.

  Add to Technorati Favorites StumbleUpon Toolbar

  1. Gravatar
    Bill Staples 3/27/2008 5:32 AM

    # re: Installing PHP on IIS7

    I'd actually recommend you use the new FastCGI feature with IIS7, which allows PHP to run just as fast as ISAPI, and more reliable. See instructions here: http://learn.iis.net/page.aspx/246/using-fastcgi-to-host-php-applications-on-iis7/

  2. Gravatar
    Andrew Kemp 3/27/2008 2:36 PM

    # re: Installing PHP on IIS7

    Cheers Bill, I'll have a go on that I just installed a Windows 2008 Server so I will try on there :) starting to get to grips with IIS 7 now.

Leave a reply

Title *

Name *

Email

Url

Comment *  

Please add 4 and 4 and type the answer here: