作者: 人才发展  发布:2019-09-24

程序员必上的开发者服务平台 —— DevStore

This article describes how to configure the FastCGI module and PHP to host PHP applications on IIS 7 and above.

IIS6+fastcgi下PHP运行超时问题解决办法;使用过程中有报错The FastCGI process exceeded configured request timeout解决办法如下:

PHP Manager for IIS 是一个用来在 Windows 平台下的 IIS (7或者更新版本)下安装 PHP 环境的工具。

图片 1  IMPORTANT: This article provides instructions on how to install and use the FastCGI component on Windows Server 2008 and Windows Vista SP1. SP1 is required on Windows Vista.



Table of Contents

  • Overview
  • Enabling FastCGI support in IIS
    • Windows Server 2008
    • Windows Vista SP1
    • Update for the FastCGI module
    • Administration Pack for IIS
  • Install and Configure PHP
  • Configure IIS to handle PHP requests
    • Using IIS Manager
    • Using command line
  • Best practices for configuring FastCGI and PHP
    • Security Isolation
    • Process recycling
    • PHP versioning
    • Security recommendations
  • Per-site PHP configuration
  • URL rewriting for PHP applications
  • Related Resources


  1. Register PHP with IIS;
  2. Validate and properly configure existing PHP installations;
  3. Run multiple PHP versions side by side on the same server and even within the same web site;
  4. Check PHP runtime configuration and environment (output of phpinfo() function)
  5. Configure various PHP settings
  6. Enable or disable PHP extensions
  7. Remotely manage PHP configuration in php.ini file


The FastCGI module in IIS enables popular application frameworks that support the FastCGI protocol to be hosted on the IIS Web server in a high performance and reliable way. FastCGI provides a high-performance alternative to the Common Gateway Interface (CGI), which is a standard way of interfacing external applications with Web servers that has been a part of the supported IIS feature set since the first release.

CGI programs are executable files that are launched by the Web server for each request to process the request and generate dynamic responses that are then sent back to the client. Because many of these frameworks do not support multi-threaded execution, CGI enables them to execute reliably on IIS by executing exactly one request per process. Unfortunately, it provides poor performance due to the high cost of starting and shutting down a process for each request.

FastCGI addresses the performance issues that are inherent in CGI by providing a mechanism to reuse a single process over and over again for many requests. Additionally, FastCGI maintains compatibility with non-thread-safe libraries by providing a pool of reusable processes and ensuring that each process handles only one request at a time.


图片 2

Enable FastCGI Support in IIS


图片 3

Windows Server 2008

Go to Server Manager -> Roles -> Add Role Services. On the Select Role Services page, select the CGI check box. This enables both the CGI and FastCGI services.

图片 4


Windows Vista SP1

Go to Control Panel -> Programs and Features -> Turn Windows features on or off. In the Windows Features dialog box, select the CGI check box. This enables both the CGI and FastCGI services.

图片 5


图片 6 IMPORTANT: Install the Update for the FastCGI Module

The update for the IIS FastCGI module fixes several known compatibility issues with popular PHP applications. Install the update from one of the following locations:

  • Update for Windows Server 2008
  • Update for Windows Server 2008 x64 Edition
  • Update for Windows Server 2008 for Itanium-based Systems
  • Update for Windows Vista SP1
  • Update for Windows Vista SP1 for x64 based Systems


Install the Administration Pack for IIS

NOTE: This step is optional.

Among other useful features, the Administration Pack for IIS has a convenient user interface for configuring FastCGI settings. The Administration Pack can be installed from the following locations:

  • Administration Pack for IIS 7 and Above - x86
  • Administration Pack for IIS 7 and Above - x64

如果遇到的是“FastCGI process exceeded configured activity timeout ”的错误,也是这样解决。