Adding PHP support for IIS7 in Vista/Win2008

  

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

Many websites are currently written in PHP, but the server environment may not necessarily be FreeBSD. Linux, many PHP websites are running 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.


Once installed, the browser input http://127.0.0.1, if nothing else, there will be a welcome screen for IIS7.

Second, install PHP

Download the PHP installation package to: http://cn.php.net/downloads.php, download windows binaries here. After completing the PHP installation, I installed it in d:\\php. In this directory, find php.ini-dist, rename it to php.ini, open php.ini:

find:extension_dir = "./", replaced with extension_dir = "d:\\php"; Found: 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, create a new application pool in IIS7, the pool's .Net type is set to unmanaged.

Create a Web site, open & ldquo; read & rdquo; and & ldquo; to run scripts & rdquo; permission, after completion, this site ISAPI Filters

Next add Handler Mapping

in the above process, the D: \\ PHP \\ php5isapi.dll added to the Handler Mapping

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

Copyright © Windows knowledge All Rights Reserved