iis7.5+php

Source: Internet
Author: User

Microsoft and Zend after the cooperation, the introduction of special fastcgi support for IIS, running PHP under IIS, should be run in fastcgi way, not the ISAPI way.

After the IIS7.0 version, Microsoft Further, the fastcgi built into the IIS, that is, as long as the PHP zip package to the local directory, the configuration of php.ini (not copied to another location), and then, without adding environment variables, do not add ISAPI filter, as long as the setting of a place, you can To run PHP perfectly in fastcgi mode under IIS.

How to configure PHP for IIS 7.0 or later:

1. In the Turn Windows features on or off (turn Windows features on or off), select Enable Internet Information Service (IIS service), where the other options can be selected as needed, but be sure to select Under "World Wide Web Services", under "Application Development Features (Application development component)", the Project "CGI".

2. Download any version of Non-thread safe zip package of PHP (PHP non-secure process zip archive), extract to any directory, such as "D:\Server\php".

3. Rename the php.ini-recommended to php.ini, open it, and modify the following options:
Fastcgi.impersonate = 1
Cgi.fix_pathinfo=1
Cgi.force_redirect = 0
Extension_dir = "./ext"; Magic, huh? Generic configuration, no matter which directory your PHP is installed in, do not specify a detailed path, this is the new feature.
4. Activate the extension options you need, which is the same as any previous version, and is not specifically described.
5. Open Internet Information Services (IIS Manager), select your computer on the left (this is not the case, do not select a specific site, the configuration is complete for all sites), and on the right, select "Handler Mapping" , then select "Add Module Mapping" on the far right, and fill in the pop-up window with the following prompt:
Request Path: *.php
Module:fastcgimodule
Executable: "D:\server\php\php-cgi.exe"
name:php via FastCGI

Yes, now all the sites on your machine can run PHP in the most efficient and secure way that IIS7.5 and php5.x officially recommend, and you can install MySQL and Zend optimizations according to your needs, all the same as before.

http://learn.iis.net/page.aspx/246/using-fastcgi-to-host-php-applications-on-iis-70/#EnableFastCGI

  • 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.