Wednesday, November 28, 2007

Installing IIS7 + PHP5 .2.5 on Windows Vista

I spent several nights on google trying to make this combo work. Now, that it's working I am sharing the steps I took with all of you who are still struggling -

  1. Start with a fresh IIS installation with both ISAPI filters and extensions enabled.
  2. Under the main settings [at the very top of your IIS Manager's hierarchy view, above Application Pools], add the following in this order:
    2.1. an ISAPI Filter for php5isapi.dll
    2.2. an ISAPI and CGI Restriction entry for php5isapi.dll
    2.3. a Handler Mapping for php5isapi.dll
  3. Go to the application Pools section.
  4. Right-click on Default Application Pool and select Advanced Settings.
  5. Set the second option [Enable 32-Bit...] to True.


From what I saw in various posts, doing this much worked for most. I had to do a couple of more things -

  1. Copy php.ini-dist to c:\windows\
  2. Under Default Web Site [sub-heading under Web Sites], add the following -
    2.1. ISAPI and ISAPI Filter modules
    2.2. an ISAPI Filter for php5isapi.dll
    2.3. a Handler Mapping for php5isapi.dll

That's it! You should be able to run the .php files now.