有关如何修改此超时限制,请参考IIS文档: 配置CGI超时设置(IIS 7)


为IIS 6安装Fast-GCI

IIS 6是Windows XP和Windows服务器2003附带的IIS的版本。流程与IIS7非常相似(请参见有用的链接和参考下面)

1、从以下位置下载IIS的Fast-CGI安装程序: 选择适合您的系统的版本(32或64位)。



1、从下载PHPhttp地址: 为您的系统(32或64位)选择适当的版本,然后选择Non-Thread Safe版本。如果您不了解VC6和VC9,请选择VC6版本。

选择IIS Fast-CGI接口:

确保选择默认情况下未启用的“ SOAP”扩展名。另外,在“其他”部分中,检查“ PEAR安装”。


cd %windir%\system32\inetsrv
cscript fcgiconfig.js -add -section:\"PHP\" -extension:php -path:\"C:\Program Files\PHP\php-cgi.exe\"

打开Internet信息服务(IIS)经理(从开始菜单“管理工具Internet信息服务(IIS)经理”或右键单击“我的电脑”,然后单击“管理”和“服务和应用程序Internet信息服务(IIS)经理” ),然后右键单击“默认网站”。然后选择“属性”。


在“映射”选项卡中检查是否存在“ .php”扩展名的条目。




  • php.iis.net有关如何使用IIS在Windows上运行PHP应用程序的说明
  • ·使用FastCGI在IIS 6.0上托管PHP应用程序,作者Ruslan Yakushev
  • 在服务器Core上安装PHP和FastCGI支持
  • ·在Windows服务器2008,Windows服务器2008 R2,Windows Vista或Windows 7的IIS 7中启用FastCGI支持


iTop and IIS

Directories access protection

iTop packages are bundled with web.config files to protect critical directories and files access.

Though web.config files are provided, the protection might be ineffective with regards to your IIS configuration. Therefore, you will have to check that the protection is effective: See the list of directories to check.

Also check the generic security configuration page !

Max execution time

If you are running iTop on IIS with PHP running in FastCGI mode, be aware that IIS imposes its own limit to the maximum execution time of a CGI process. By default this limit is configured to 300 seconds. This means that, even if you configure in PHP.ini maximum_execution_time to a value greater than 300 seconds, the CGI process will be stopped by IIS after 300 seconds.

When performing bulk and lengthy operations interactively (such as mass modifications, mass deletions or CSV import), iTop extends the PHP maximum execution time automatically, in order to prevent the operation from being interrupted before its completion. This has no effect on the limit imposed by IIS, and though the task may still be killed after 5 minutes.

Refer to the IIS documentation for how to modify this timeout limit: Configure CGI Time-out Settings (IIS 7)

Configure IIS for PHP

Installing Fast-GCI for IIS 6

IIS 6 is the version of IIS that comes with Windows XP and Windows Server 2003. The process is quite similar for IIS7 (see the Useful Links & References below)

  1. Download IIS's Fast-CGI installer from: Pick the version (32 or 64-bit) suitable for your system.

  2. Start the installation by launching the .msi installer

Installing and configuring PHP

  1. Download PHP from Select the appropriate version for your system (32 or 64-bit), and pick the Non Thread Safe version. If you don't know between VC6 and VC9, pick the VC6 version.

Select the IIS Fast-CGI interface:

Make sure that you select the “SOAP” extension which is not enabled by default. Also In the “Extras” section, check the “PEAR Install”.

Then register the FastCGI extension for the whole web site:

cd %windir%\system32\inetsrv
cscript fcgiconfig.js -add -section:\"PHP\" -extension:php -path:\"C:\Program Files\PHP\php-cgi.exe\"

Open the Internet Information Service (IIS) Manager (either from the start menu “Administrative Tools/Internet Information Services (IIS) Manager” or right-click on “My Computer” then “Manage” and “Services And Applications/Internet Information Services (IIS) Manager”) and right-click on the “Default Web Site”. Then choose “Properties”.

Then click on the tab “Home directory” and click on the “Configuration…” button:

Check in the “Mappings” tab that there is an entry for the “.php” extension.

If not, press the “Add…” button and fill the form as below (adjust the path to the correct location of fcgiext.dll)

Go back to the “Documents” tab and check that “index.php” is present, at the top of the list. if it's not there, add an entry for it using the “Add…” button.

Useful Links & References

由 superadmin 在 2020/08/27, 15:53 创建