How to add PHP support for IIS7 in vista/win2008

Source: Internet
Author: User
Keywords How to add PHP support for IIS7 in vista/win2008

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

Many web sites are currently written in PHP, but their server environment may not necessarily be FreeBSD, Linux, and 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 many previous messages.

Below, let me enter today's topic, how to add support for PHP Web page under IIS7.

System environment: Vista/windows Server 2008

First, the installation of IIS7 (Control Panel \ Programs and functions, Windows Features), in the default selection of conditions, remember to check the ISAPI two options.

After the installation is complete, enter http://127.0.0.1 in the browser, and if not unexpectedly, a IIS7 welcome screen will appear.

Second, Next, 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 in d:\php, in this directory, find php.ini-dist, rename it to PHP.ini, open php.ini:

Found: Extension_dir = "./", replaced by Extension_dir = "d:\php";
Find: Windows Extensions:
Remove the comments 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 files to the system's Windows directory.

Third, create a 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 finished, add an ISAPI Filters to this site


Then add handler Mapping


In the above procedure, add D:\PHP\php5isapi.dll to handler mapping

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

  • Related Article

    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.