Currently, many websites are written in PHP. However, the server environment may not be FreeBSD or Linux. many PHP websites run on Windows2000, Windows2003, and WindowsServer2008 systems. In addition, according to the previous message display, WindowsServer VistaIISIIS7
Currently, many websites are written in PHP. However, the Server environment may not be FreeBSD or Linux. many PHP websites run on Windows2000, Windows2003, and Windows Server 2008 systems. In addition, according to many previous messages, the efficiency of running PHP in Windows Server 2008 has been improved by more than 40%.
Next, let me go to today's topic and add support for PHP web pages under IIS7.
System environment: Vista/Windows Server 2008
1. first, install IIS7 (control panel \ program and function, Windows function). remember to check the two ISAPI options under the default conditions.
After the installation is complete, enter http: // 127.0.0.1 in the browser. If no exception occurs, an IIS7 welcome page will appear.
II. Next, install PHP
To download the PHP installation package, go to http://cn.php.net/downloads.php to download Windows binaries. After installing PHP, I installed it in d: \ php. in this directory, find php. ini-dist, change it to php. ini, and open php. ini:
Find: extension_dir = "./" and replace it with extension_dir = "d: \ php ";
Find: Windows Extensions:
Remove the annotator of each line configured in the module below, for example:
Extension = php_mbstring.dll
Extension = php_gd2.dll
Extension = php_MySQL.dll
Save. Copy the file to the windows directory of the system.
3. create an application pool in IIS7 and set the. Net type of the pool to unmanaged.
Create a new website, enable the "read" and "Run script" permissions, and then add ISAPI Filters to the website.
Add Handler Mapping
In the preceding process, add D: \ PHP \ php5isapi. dll to Handler Mapping.
OK. All operations are completed. Now you can test whether a php file can run normally.