Environment:
Operating System: Windows 2003 Server SP2
PHP version: php-5.2.6-Win32
1. Download FastCGI for IIS6
Http://www.iis.net/download/fastcgi
After downloading the SDK, double-click it to install it.
After installation, five files are generated in the c: \ windows \ system32 \ inetsrv directory. For example:
- Fcgiext. dll-FastCGI ProcessingProgram
- Fcgiext. ini-configuration file
- Fcgiconfig. js-FastCGI control script
FastCGI handler is added to the "Web Service extension" of IIS.
2. Download php5.2.14 for Windows
Http://www.php.net/downloads.php
Download the. Zip version, decompress it to the C: \ PHP Directory, and grant the read and run permissions to the IIS startup account group or users. For example:
You can decompress the package to another directory as needed.
3. Register PHP to FastCGI
Open the c: \ windows \ system32 \ inetsrv \ fcgiext. ini file.
; This is the configuration file for the FastCGI handler for IIS 6.0.
; The FastCGI handler will look for this file in the same directory
; Fcgiext. dll. By default, the FastCGI installer will place this file
; The % WINDIR % \ system32 \ inetsrv directory.
My personal understanding is that when FastCGI handler in "Web Service extension" is allowed, fcgiext is loaded. the fcgiext. the content of the ini configuration file provides ing for each website according to the configuration in it.
Add the following configuration under [Types:
[Types]
PHP = PHP
[PHP]
Exepath = c: \ PHP \ php-5.2.14-Win32 \ php-cgi.exe
"Php" indicates the extension. "php" is the name of the configuration section, which is defined in "[PHP.
4. Configure PHP. ini
Copy one of c: \ PHP \ php-5.2.14-Win32 \ PHP. ini-recommended and rename it D: \ PHP. ini
Open c: \ PHP \ php-5.2.14-Win32 \ PHP. ini, modify:
Extension_dir = "C: \ PHP/php-5.2.14-Win32 \ Ext"
FastCGI. Impersonate = 1
Modify the settings of PHP. ini as needed. Here, you can only run php, and restart IIS after modification.
5. Configure the website
Right-click a website and choose Properties> Home directory> Configuration> Add, as shown in the following figure:
Executable File Path: c: \ windows \ system32 \ inetsrv \ fcgiext. dll
6. Write a PHP test.
<? PHP
Phpinfo ();
?>
The following results show that your server can run php.
If no input file specified is displayed, it is estimated that FastCGI. Impersonate is not configured.
Reference http://hi.baidu.com/imdao/blog/item/16583512f11cb654f819b858.html
Configure the FastCGI extension for IIS 6.0