1. First, PHP has been changed from 5.2 to FastCGI. Therefore, to install the latest php5.4 version, you must first install FastCGI. FastCGI is as follows:
Http://www.iisboy.com/iis_down/552.html
Run and install
2. download the latest PHP code
: Http://windows.php.net/download/
Download non-thread-safe. You can download the corresponding version as needed.
3. To run php5.4, you need the vc9 Runtime Library as follows:
Http://www.microsoft.com/downloads/zh-cn/details.aspx? Displaylang = ZH-CN & familyid = 9b2da534-3e03-4391-8a4d-074b9f2bc1bf
Run and install
If not installed, the following error occurs:
XP the FastCGI handler was unable to process therequest
Error number: 14001
4. decompress the php-5.4.0-nts-win32-vc9-x86.zip file and place it in any location, for example, D: \ PhP5.
Modify PHP. ini-development to PhP. ini.
5. Modify the php. ini file as follows:
; On Windows:
Extension_dir = "D:/PhP5/EXT"
(Remove the semicolon above)
Extension = php_curl.dll
Extension = php_gd2.dll
Extension = php_gettext.dll
Extension = php_mbstring.dll
Extension = php_exif.dll
Extension = php_mysql.dll
Extension = php_pdo_mysql.dll
Extension = php_xmlrpc.dll
Extension = php_zip.dll
FastCGI. Impersonate = 1
6. Modify the fcgiext. ini file.
This file will appear in the following directory after installation: c: \ windows \ system32 \ inetsrv
Add the following code at the end of the fcgiext. ini file:
[Types]
PHP = PHP
[PHP]
Exepath = D: \ PhP5 \ php-cgi.exe
Instancemax requests = 10000
Activitytimeout = 300
Requesttimeout = 600
Environmentvars = php_fcgi_max_requests: 10000, phprc: D: \ PhP5 \
Note: Only one[Types], whereThe path in D: \ PhP5 \ php-cgi.exe and phprc: D: \ PhP5 \ is the storage path of PHP, otherwise the following error occurs:
FastCGI Error
The FastCGI handler was unable to process the request.
--------------------------------------------------------------------------------
Error details:
Cocould not find entry for "php" On Site 1 in [Types] section.
Error number: 1413 (0x80070585 ).
Error Description: Invalid index.
HTTP Error 500-server error.
Internet Information Services (IIS)
C: \ windows \ system32 \ inetsrv \ fcgiext. ini
This error occurs because c: \ windows \ system32 \ inetsrv \ fcgiext. INI is correctly configured as mentioned above
7. IIS settings
The premise is that IIS has been installed and the website attributes are set as follows:
Run the test program code
<? PHP phpinfo ();?>
The installation is completed as follows: