Currently many Web sites are written in PHP, but their server environment may not be FreeBSD, Linux, many PHP sites are running on Windows2000, Windows2003 and Windows Server 2008 systems. Furthermore, the efficiency of running PHP in Windows Server 2008 has increased by more than 40%, according to previous messages. Next, let me go into today's topic, how to add support for PHP pages under IIS7.
System environment: Vista/windows Server 2008
First, install IIS7 (Control Panel \ Program and function, Windows function), in the default selection of conditions, remember to hook up the ISAPI two options.
When the installation is complete, enter http://127.0.0.1 in the browser, and if not, a IIS7 welcome interface will appear.
Second, Next, install PHP
Download the PHP installer package to: http://cn.php.net/downloads.php, where you can download Windows binaries. After completing the PHP installation, I installed it in d:\php, in this directory, find php.ini-dist, rename it to PHP.ini, and open php.ini:
Find: Extension_dir = "./", replace with extension_dir = "d:\php";
Found: Windows Extensions:
Remove the annotation characters for each line under the module configuration below, as shown in the following example:
Extension=php_mbstring.dll
Extension=php_gd2.dll
Extension=php_mysql.dll
Save. Copy the file to the system's Windows directory.
New application pool in IIS7, pool. NET type is set to unmanaged.
Create a new Web site, open the "read" and "Run Script" permissions, and when you are done, add the ISAPI Filters to this site
Then add handler Mapping
In the process above, add D:\PHP\php5isapi.dll to handler mapping
OK, all operations complete. Now you can test whether a PHP file will work correctly.