Configure PHP 5.38 In iis6.0 (solve the problem that curl cannot be enabled in earlier PHP versions)

Source: Internet
Author: User
Tags register php
The new version of php5.3 cannot be installed on IIS through the old method (because PHP 5.3 does not support ISAPI now, but FastCGI is used ), now we will provide a tutorial on installing php5.3 and later on IIS.

Then download and install IIS FastCGI: http://www.iis.net/download/fastcgi select x86 or download x86, download the name is fcgisetup_1.5_rtw_x86.msi. For example

After the installation is successful, five files are created in the c: \ windows \ system32 \ inetsrv \ directory, as shown in figure

At this time, a FastCGI handler is added to the "Web Service extension" in IIS 6.

Download and install php5.3.8, http://windows.php.net/download/ under IIS, (note that you want to select the version of vc9 under IIS: Microsoft Visual C ++ 2008 redistributable package (x86 ):
Http://www.microsoft.com/downloads/details.aspx? Familyid = 9b2da534-3e03-4391-8a4d-074b9f2bc1bf & displaylang = ZH-CN
) Decompress the package to the desired directory, which requires the user to read and run.

The following content is to be configured and modified:

    • If your php5.3.8 is an installed version (ending with. MSI), you can directly test and run the software. The configuration has been completed during the installation process.
    • If your php5.3.8is a compressed version (ending with .zip), perform the following configuration after installation.

1. Modify environment variables. My computer, properties, advanced, environment variables, system variable Path = E: \ PHP .)

2. Modify the FastCGI installation directory (register PHP to FastCGI)

Open the c: \ windows \ system32 \ inetsrv \ fcgiext. ini file, and add the following statement at the end of the file:

 
[Types] (this is the original file. You can add the following statement after [Types]. Otherwise, an error will be reported .) PHP = PHP [PHP] exepath = E: \ PHP \ php-cgi.exeInstanceMaxRequests = 10000 activitytimeout = 600 requesttimeout = 600 environmentvars = php_fcgi_max_requests: 10000, phprc: e: \ PHP \

3. php. the php5.3.8 installation directory for INI modification does not contain PHP. only PHP. ini-Development and PHP. ini-production. change ini-development to PhP. INI (if you are afraid of mistakes, back up it first ).

Note: first, create a folder named TMP, and place it in E: \ PHP \ TMP. (Upload_tmp_dir will be used, and upload_tmp_dir is used to define the temporary path for storing the uploaded file. Here, you can modify and define an absolute path for it. At the same time, you must have the read and write permissions .). Use the shortcut key Ctrl + F to change the following keyword to the current value:

Short_open_tag = off (this is the default, so we should not change it .) Change; upload_tmp_dir = to upload_tmp_dir = "E: \ PHP \ tmp" to; CGI. force_redirect = 1 to CGI. force_redirect = 0; FastCGI. impersonate = 1; changed to FastCGI. impersonate = 1; change; extension_dir = "Ext" to extension_dir = "E: \ PHP \ Ext"; date. change timezone = to date. timezone = PRC (if you do not modify date. timezone. When you open a webpage, the error 500 may be prompted. Someone has changed the value to Asia/Shanghai. I have never tried it. You can try it .)

Remove the semicolon (;) before the extension in Windows extensions (;):

 
; Extension = php_curl.dll; Extension = php_gd2.dll; Extension = plugin; Extension = php_exif.dll; Extension = php_mysql.dll; Extension = plugin; Extension = php_sockets.dll; Extension = plugin

4. modify Internet Information Service (IIS) Manager

1) Add executable files = c: \ windows \ system32 \ inetsrv \ fcgiext. DLL to website, properties, home directory, and configuration. Extension =. php. Action is limited to = Get, Head, and post. Entire operation

2) Add the default content = index. php to the website properties document. All the configurations are complete. You must restart the IIS service.

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.