Posted by : Tom Doyle in (Web Development) 14th Jul, 2008
Install PHP 5 with IIS 7 (Windows Vista)
Tagged Under : Internet Information Service, PHP, Windows Vista, World Wide Web
I had to get my hands dirty today and get a look at some code we’re developing. Having not developed personally in quite some time, I had no reason to have IIS installed, nevermind PHP!
So I set off on the task of installing PHP 5.2 on my Windows Vista machine. And here’s how I did it.
- Install IIS7
Control Panel > Programs and features > Turn Windows features on or off
From here I selected Internet Information Service. I dug a little deeper into Worldwide Web Services and turned on the ISAPI extensions. - Download & Install PHP
Download PHP http://www.php.net/downloads.php - for simple set up, get the zip package.
Unzip your files to your preferred location, mine is C:\PHP
Copy the php.ini-dist file into your windows folder. (C:\windows\php.ini) - Open IIS Manager
From your start menu, type iis and hit return to open IIS Manager.
Select “default web site” and double click, “Handler Mappings”.
On the right hand side - select “Add Script Map”In the dialogue that opens enter the following:
Request Path: *.php
Executable: C:\PHP\php5isapi.dll (*NOTE*: if this is where you’ve stored the unzipped files)
Name: PHPClick OK. Then you will be asked “Would you like to enable the ISAPI extension”, choose Yes. - That’s It!
You might want to check it with a phpinfo file.
e.g. Create a text file and type <? phpinfo(); ?>. Save this file as phpinfo.php, copy it into your C:\inetpub\wwwroot. Go to your browser and open http://localhost/phpinfo.php
Enjoy!


















nope, doesn’t work for me, I am running vista business, iis7, attempting to run php5 and mysql 5 and I can’t get any joy at all. php5 and mysql 5 works ok on my XPPro workstation, but on my laptop with vista business is a no go.
You may referral to this link.
You problem is the php by default is 32 bit, and your Vista is 64 bit, therefore you need enable this in IIS
Application Pools \ DefaultAppPool \ Advanced Settings… \ (General) Enable 32-Bit Applications: True
By default it’s false.
Cheers,
Thanks for the info! NOTE: the ISAPI module is not installed by default. Windows Vista users and maybe others will need to go into Control Panel > Programs and Features > Windows Components > Turn Windows Features on or off > Internet Information Services > World Wide Web Services > Application and Development Features and install the ISAPI filters and Extensions.
I tried all that was suggested and still failed. I eventually ound a Microsoft avi online explaining how to install PHP on Vista by using the Fast-CGI method, and it would appear my main problem was that I had to install the NON THREAD SAFE verion of PHP. It appears to be working at the moment, but I do need to test further.