Home >Backend Development >PHP Tutorial >Add PHP support for IIS7 in Vista/Win2008_PHP tutorial

Add PHP support for IIS7 in Vista/Win2008_PHP tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-07-21 14:57:32843browse

Currently, many websites are written in PHP, but their server environments are not necessarily FreeBSD or Linux. Many PHP websites run on Windows2000, Windows2003 and Windows Server 2008 systems. Moreover, according to many previous reports, the efficiency of running PHP in Windows Server 2008 has increased by more than 40%.​

Next, let me enter today’s topic, how to add support for PHP web pages under IIS7.

System environment: Vista / Windows Server 2008

1. First, install IIS7 (Control Panel Programs and Features, Windows Features). Under the default selection conditions, remember to check the two options of ISAPI

 

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

2. Next, install PHP

To download the PHP installation package, you can go to: http://cn.php.net/downloads.php, and download the 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, and open php.ini:

Found: extension_dir = "./", replace with extension_dir = "d:php";

Found: Windows Extensions:

Remove the comments on each line under the module configuration below. The example is as follows:

extension=php_mbstring.dll

extension=php_gd2.dll

extension=php_MySQL.dll

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

3. Create a new application pool in IIS7, and set the .Net type of the pool to unmanaged.

 

Create a new website and enable the "Read" and "Run Script" permissions. After completion, add ISAPI Filters to this website

 

Then add Handler Mapping

 

In the above process, add D:PHPphp5isapi.dll to Handler Mapping

OK, all operations are completed. Now you can test whether a PHP file works properly.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/364013.htmlTechArticleMany websites are currently written in PHP. However, the server environment is not necessarily FreeBSD or Linux. Many PHP websites are It runs on Windows2000, Windows2003 and Windows Server 2008 systems...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn