Enabling iis7 to support php configuration in windows

Source: Internet
Author: User

In windows, the most common php method must be supported. One is to run apache independently, and the other is to load php files through iis, so that the iis server can support both php and asp, asp.net. Next I will introduce how to enable iis to support php configuration.

If no package is prepared, go

PHP5.2.17 official download: http://windows.php.net/downloads/releases/php-5.2.17-Win32-VC6-x86.zip

PHP5.3.5 official download: http://windows.php.net/downloads/releases/php-5.3.5-Win32-VC9-x86.zip

First, install IIS7 and check the three items.

 

Note: CGI will be used in IIS7 + PHP_5.3.5 Environment

ISAPI extension and ISAPI filter used in IIS7 + PHP_5.2.17

Add PHP support for IIS below

 IIS7 + PHP_5.3.5

1. decompress the downloaded php_5.3.5 to the C: php Directory (you can also put it elsewhere, but modify it later)

2. Rename php. ini-development to php. ini.

3. modify php. search for data in ini. change timezone to date. timezone = "Asia/Shanghai" (This must be changed here, otherwise a warning will be reported) find Windows Extensions to enable the required modules, such as php_curl.dll php_mysql.dll php_mysqli.dll php_xmlrpc.dll php_curl.dll. You just

4. Add <module ing>

 

 

 

The path here is based on your actual situation.

5. Create a New phpinfo. php text file in the root directory of the website. The content is:

<? Php
Phpinfo ();
?>

6. Test. Open the browser and check the result: localhost/phpinfo. php. If you can see a page similar to the following, it means you have succeeded:

Now we can successfully run the PHP program.

IIS7 + PHP_5.2.17

The isapi extension and isapi filtering have been selected before IIS is installed. You do not need to add a role service here.

Modify the php. ini file first ..

Put php under c: php. ini-dist (the display extension must be set first) and renamed to php. ini, open it in notepad and find extension_dir = ". /", and then put. /change to c: php (modify the path based on your actual situation)

1. Add an application pool

 

2. Add isapi and cgi restrictions

 

3. Add an isapi filter

 

4. Add script ing

 

5. Test (phpinfo. php has been created before). Open localhost/phpinfo. php as before to check the effect:

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.