How to Configure PHP5 on Windows 7 using IIS7

Most People uses Wamp or Xampp as Web server for PHP programming in Windows. But on Professional Web servers or Hosting Servers IIS is used in Combination with Windows. Because IIS have more compatibility with Windows as both are products of Microsoft. It’s configuration is more tricky as compared to Wamp or Xampp. So This Tutorial Explains Configuring PHP5 on IIS7.

Before that please Download the Following file : php5. It contains PHP5 files you can also download it from official site of PHP. In the Following Tutorial Please don’t Forgot to Replace C: Drive with Windows Installation Drive

Follow Following Steps to Configure PHP on IIS :

  • Extract Downloaded Folder and Copy Extracted PHP5 Folder into Drive Where Windows 7 is Installed i.e, Path of PHP5 Folder should be Windir:/php5 example “C:\PHP5” .
  • Copy php.ini from php5 folder and paste it in Windows Folder whose location will be “C:\Windows\”  and not Forget to Change C:\ to your Windows Directory in php.ini.
  • Now Copy libmysql.dll from php5 to system32 Folder whose Location will be “C:\Windows\system32”.

Now Time to Install IIS 7

Goto Program and Features in Control Panel and Click On Turn Windows Features On or Off. Choose Internet Information Services. and Choose Options Shown in image below :

  • Now Open Run Prompt or Press(Windows+R) and type “inetmgr”(without quotes) .
  • Select “default web site” and double click, “ISAPI FILTERS ”.On the right hand side – select “Add ”. In the dialogue that opened enter the following:

Name: PHP
Executable: C:\PHP5\php5isapi.dll (*NOTE*: if this is where you’ve stored PHP5)
Click OK.

  • Now again Select “default web site” and double click, “Add Module Mapping ”.In the dialogue that opens enter the following:

Request Path: *.php
Module:FastCgiModule
Executable: C:\PHP5\php-cgi.exe (*NOTE*: if this is where you’ve stored the PHP5)
Name: PHP

Click OK.

  • Now Download File Test.php. Copy test.php into C:\inetpub\wwwroot\ (where c:\ is your root Directory)
  • Open Your Browser and type : localhost/test.php. If you can see the web page as in Following Image

You have Successfully Configured PHP on IIS. Now you can work with PHP.

Thanks…

Comments are closed.