1. Download and install FastCGI Extension for Internet Information Services 6.0
Http://www.microsoft.com/downloads/details.aspx? FamilyID = 2d481579-9a7c-4632-b6e6-dee9097f9dc5 & displaylang = en
2. Download php-5.2.5
Http://www.php.net/downloads
Decompress the package to the C: \ PHP Directory.
Make sure that the IIS startup account has the permission to read and execute C: \ PHP \ *.
3. Register PHP to FastCGI
Cscript fcgiconfig. js-add-section: "PHP"-extension: php-path: "C: \ PHP \ php-cgi.exe"
4. Perform some performance and security settings
C: \ PHP \ php. ini-recommended to C: \ PHP \ php. ini
Open C: \ PHP \ php. ini and modify:
Extension_dir = "C: \ PHP \ ext"
Fastcgi. impersonate = 1
Cgi. fix_pathinfo = 1
Cgi. force_redirect = 0
Run:
Cscript fcgiconfig. js-set-section: "PHP"-InstanceMaxRequests: 10000
Cscript fcgiconfig. js-set-section: "PHP"-EnvironmentVars: PHP_FCGI_MAX_REQUESTS: 10000
You can set the maximum pool and number of response connections based on your hardware configuration and usage.
1. Download FastCGI's latest RTM version here
2. Download the PHP version of non-thread-safe (Non-secure thread) Here (the latest version is PHP 5.2.5 non-thread-safe Win32 binaries)
3. Decompress PHP to the directory you want to install, such as E: \ PHP.
4. Install FastCGI
5. Configure FastCGI & integrate PHP
Start, Run, CMD
Cd % WINDIR % \ system32 \ inetsrv
Cscript fcgiconfig. js-add-section: "PHP"-extension: php-path: "E: \ PHP \ php-cgi.exe"
6. Configure IIS & PHP
Start, Run, inetmgr
Expand in sequence, right-click the site to be configured, and select Properties.
Switch to the "main directory" tab, "Configure", "add", and "Browse", select C: \ Windows \ system32 \ inetsrv \ inetfcgiext. dll, and click "OK"
Enter ". php" for the extension, select "Script Engine" and "check whether the file exists", and click "OK" to return to the "site properties" dialog box.
Switch to the document tab, add, and enter index. php.
Copy the PHP. ini-recommend file in the php installation directory, change the name of the copy to php. ini, and edit the file.
Search
Extension_dir =
Change the content in the quotation marks to your PHP extension directory, such as E: \ PHP \ ext.
Extension_dir = "E: \ PHP \ ext"
Search for fastcgi. impersonate and change its value to 1. Note that the previous one is removed.
Find cgi. force_redirect and set its value to 0. Remove it;
OK, you are done. Put a test file in your site to run it.
<? Php phpinfo ();?>