Win2K3 IIS6 PHP with FastCGI

Source: Internet
Author: User
Tags register php

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 ();?>

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.