Page 1 of 1

How to Install PHP on IIS 7 on Vista

Posted: Fri Mar 12, 2010 6:26 pm
by Saman
1.jpg
1.jpg (10.38 KiB) Viewed 3278 times
Are you a .NET developer? Looking forward to learn or switch to PHP. You can setup PHP in IIS server. I’ll walk you through step by step to make you ready for the journey.

First of all you need to install PHP to your computer. You can download PHP from http://www.php.net/downloads.php. PHP installation is pretty straight forward. I believe you can manage it.

Next you need to ensure whether the IIS server installed in your computer. Regular windows installation won’t install IIS server. So, to test whether it is there or not, right click on My Computer icon and select Manage. Then expand the Services and Application node.
2.png
2.png (43.94 KiB) Viewed 3278 times
If you don’t see Internet information Service, that means that you should install IIS server manually. It’s pretty simple.

Go to Control Panel and select Classic View in the left pane. Then double click on the Programs and Features icon. Now you’ll have a list of option in your right pane. Select Turn Windows features on or off.
3.png
3.png (48.79 KiB) Viewed 3278 times
Click the Internet Information Server check box and expand the node.
4.png
4.png (68.46 KiB) Viewed 3278 times
Again expand the World Wide Web Services , Application Development Features and click the ISAPI Extensions. Then click OK. It will take several minutes to installation.
5.png
5.png (37.75 KiB) Viewed 3278 times
Now you can check whether the server working properly. Open up your internet browser and type http://localhost/ . You’ll get a page as follows
6.png
6.png (82.07 KiB) Viewed 3278 times
Now you need to configure the server for PHP. Go to the Computer Management window again (Right click on My Computer and select Manage) and expand the Services and Applications node and click the Internet Information Services link. Then in the connection area select Default Web Site.
7.png
7.png (45.65 KiB) Viewed 3278 times
Click on Handler Mappings.
8.png
8.png (29.3 KiB) Viewed 3278 times
On the right side of the window, click on “Add Script Map…”
9.png
9.png (16.86 KiB) Viewed 3278 times
Once you clicked a pop up window will appear. Fill up the fields with following values.
10.png
10.png (129.65 KiB) Viewed 3278 times
Click OK. Then a Dialog box will appear. Say Yes! to that. Thats it!

Now you need to check whether the server working with PHP. Open up your favorite text editor and type1

Code: Select all

<?php
      phpinfo();
?>
Save the file as phpinfo.php under “C:\inetpub\wwwroot”.

Then open up your browser and navigate to http://localhost/phpinfo.php
If you get following page.., you are done..!
11.png
11.png (69.06 KiB) Viewed 3278 times