How to add PHP support for IIS7 in Vista/Win2008

  
How to add PHP support for IIS7 in Vista /Windows Server 2008

At present, many websites are written in PHP, but the server environment may not be FreeBSD or Linux. Many PHP websites run on Windows 2000, Windows 2003 and Windows Server 2008 systems. Moreover, according to many previous news reports, the efficiency of running PHP in Windows Server 2008 has increased by more than 40%.

Below, let me enter today's theme, how to add support for PHP pages under IIS7.

System Environment: Vista /Windows Server 2008

First, install IIS7 (Control Panel\\Programs and Features, Windows Features), under the default selection conditions, remember to check ISAPI Two options.



After the installation is complete, enter http://127.0.0.1 in the browser. If nothing happens, an IIS7 welcome screen will appear.

Second, Next, install the PHP

Download PHP installation package can go to: http: //cn.php.net/downloads.php, download the windows binaries. After completing the PHP installation, I installed it in d:\\php. In this directory, I found php.ini-dist, renamed it to php.ini, and opened php.ini:

Found:extension_dir = "./", replaced with extension_dir = "d:\\php";
Find: Windows Extensions:
Remove the comment for each line in the module configuration below, for example:

extension= Php_mbstring.dll
extension=php_gd2.dll
extension=php_MySQL.dll

Save. Copy the file to your system's windows directory.

Third, the new application pool, pool type disposed in IIS7 .Net unmanaged.




Create a new website, open the "Read" and "Run Script" permissions, after completion, add ISAPI Filters to this site




Then add Handler Mapping


In the above process, add D:\\PHP\\php5isapi.dll to Handler Mapping

OK, all operations are completed. Now you can test if a PHP file is working properly.

Copyright © Windows knowledge All Rights Reserved