|
After Microsoft cooperated with Zend, Microsoft launched a special FastCGI support for IIS. to run PHP under IIS, FastCGI should be used for running, rather than ISAPI.
In versions later than IIS7.0, Microsoft went further and built FastCGI into IIS. that is to say, you only need to extract the php zip package to any directory on the local machine and configure php. ini (do not copy to another location), and then, do not add environment variables, do not add ISAPI filter, as long as you set a place, you can run PHP in The FastCGI mode in the IIS.
How to configure PHP in IIS 7.0 or later versions:
1. in "Turn Windows features on or off (enable or disable windows function)", select "Internet Information Service (IIS Service)". other options can be selected as needed, however, you must select the "CGI" project under "Application Development Features (Application Development component)" under "World wide web services.
2. download any version of the non-thread safe zip package of PHP (PHP's non-security process zip package) and decompress it to any Directory, such as "D: \ Server \ php ".
3. rename 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"; is it amazing? General configuration. no matter which Directory your php is installed, it is OK and you do not need to specify the detailed path. this is a new feature.
4. activate the extension options you need. This step is the same as any previous version.
5. open "Internet Information Services (IIS) Manager (IIS Manager)" and select your computer on the left side. (we recommend that you do not select a specific site. the configuration takes effect for all sites ), select "Handler Mapping" on the right and "Add Module Mapping" on the right. in the pop-up window, enter the following prompt:
Request path: *. php
Module: FastCgiModule
Executable: "D: \ server \ php \ php-cgi.exe"
Name: PHP via FastCGI
Now, all the sites on your machine can run PHP in the most efficient and secure way officially recommended by IIS7.5 and PHP5.x. you can install mySQL and Zend optimization as needed, these are the same as before.
Http://learn.iis.net/page.aspx/246/using-fastcgi-to-host-php-applications-on-iis-70/#EnableFastCGI
|