PHP installation with extensions (mysql) for IIS7 in Windows Vista and Windows 7

When you download the PHP installer, it fails to install for Windows Vista. So you have to install it manually. Just download the zip file and extract it somewhere that you can remember. Then you might want to manual installation instructions, but it won’t be correct for IIS7. Here is the guideline to install PHP to IIS7.

  1. Copy the php.ini to windows folder. enable the needed extensions by editing the file. Give rights for the file, to IUSR user, so that IIS can access the file.

  2. Run IIS Manager (inetmgr.exe)

iis manager

  1. For the main site, click to ISAPI Filters, right click to add or actions add to php ISAPI handler with the filter name that you want. Just point to php5isapi.dll file which is the isapi filter.


  1. Than come back to main site, and click to ISAPI and CGI Restrictions, and click add a restriction. For ISAPI and Cgi path select php5isapi.dll file and give a desired name for description. Also don’t forget to click “Allow extension path to execute” isapi

  2. Make sure that after adding, php is allowed from the ISAPI and CGI Restrictions window. isapicgirestrcit.png

  3. On ISAPI and CGI Restrictions page, right click to php and click to “Edit feature Settings”, from there you need to select both of them to enable php extensions to work, like mysql, mssql or ssl extensions specified in my.ini Feature Set

  4. Go to main site again, and click for the “Handler Mappings”. Click to add “Script Map”. For the request path type *.php, executable is php5isapi.dll Name is Php addscript

  5. It will ask for the script map to add, just click to yes. Script Map

  6. Our php and extensions should work now, but we might want to add index.php file to look for a folder. From the main window, we click to “Default Document” and add index.php to the end of list.

That’s all for php and extensions to work.