Step 7: Install php5.4 in Windows

Source: Internet
Author: User
Tags vc9

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:

 

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.