Add PHP support for IIS7 in Vista/Win08

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.