Add support for PHP web pages under IIS7

  
Many websites are currently written in PHP. However, the server environment may not be FreeBSD or Linux. Many PHP websites are running on Windows2000, Windows2003 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%.

Now, let me move on to today's topic, how to add support for PHP pages in IIS7 below.

system environment: Vista /Windows Server 2008

I. First, install IIS7 (Programs and Features Control Panel, Windows function), under the conditions selected by default, remember to be on the hook of 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, opened php.ini:

Found:extension_dir = " ./", replaced by 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.

a new website on "Read" permissions and "Run script", and after completion, this site ISAPI Filters

then add Handler Mapping

above In the process, add D:PHPphp5isapi.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