Add PHP support for IIS7 in vista/win08

Source: Internet
Author: User
Tags install php ini php file
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.



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.