IIS6 to configure fastcgi PHP tutorial _win Server

Source: Internet
Author: User
Tags php tutorial register php
The fastcgi IIS module enables the popular application framework to support the FASTCGI protocol on IIS to provide high performance and availability access services, FASTCGI provides high-performance CGI replacement standards for existing network servers. The specific PHP installation method I recorded, including an error occurred.
Environment:
Operating system: Windows 2003 Server
PHP Version: PHP5.25


1. Download fastcgi for IIS6
http://www.microsoft.com/downloads/details.aspx?FamilyID=2d481579-9a7c-4632-b6e6-dee9097f9dc5&displaylang=en

After downloading, double-click to run for installation.

2. Download PHP5.25 Windows edition
Http://www.php.net

Download the. zip format, download and extract to the D:\PHP directory, and give the IIS startup account group or user permission to read and run.

3. Register PHP to FastCGI
Run at the command line
cscript fcgiconfig.js-add-section: "PHP"-extension:php-path: "D:\PHP\php-cgi.exe"

Fcgiconfig.js Default storage directory is: C:\WINDOWS\system32\inetsrv

4. Set
Rename the D:\PHP\php.ini-recommended to D:\PHP\php.ini
Open D:\PHP\php.ini, modify:
Extension_dir = "D:\PHP\ext"
Fastcgi.impersonate = 1
Cgi.fix_pathinfo=1
Cgi.force_redirect = 0

Other php.ini are set to modify according to the actual needs
Then execute:
cscript fcgiconfig.js-set-section: "PHP"-instancemaxrequests:500
cscript fcgiconfig.js-set-section: "PHP"-environmentvars:php_fcgi_max_requests:1000
The above two sets the maximum pool and the number of response connections, can be based on the operation of the machine hardware configuration, usage modification

When you have finished, restart IIS and write a test page to try it.

The first time I installed, I removed the Wsshell command for the sake of server security, causing the following error in step 3rd:
Microsoft JScript run-time Error: Automation server cannot create object
After the registration by re-register command: regsvr32 wshom.ocx
Problem solving

After you restart IIS, the following prompts appear for the test page to open:

FastCGI Error
The FastCGI Handler is unable to process the request.
--------------------------------------------------------------------------------

Error Details:

Error Number:5 (0x80070005).
Error Description: Access denied.
HTTP Error 500-server error.
Internet Information Services (IIS)

This error is due to the fact that the IIS startup account has not been granted read and run permissions to the directory after the PHP has been uncompressed. Modify the folder security properties to resolve the problem.

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.