e公关 搜索品牌营销、公关策划

FastCGI For IIS6

FastCGI For IIS6

FastCGI for 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), a standard way of interfacing external applications with Web servers that has been supported as part of the IIS feature-set since the very first release.

为了提升PHP在IIS的执行效率,微软IIS产品组发布了FastCGI for IIS,这个产品是免费的,需要使用IIS+PHP的童鞋看看吧!
FastCGI跟传统的CGI模式相比,采用了更加合理的解析进程启动模式。目前,apache已经能直接采用FastCGI模式解析php脚本,然而,在IIS7中也加入FastCGI的支持。

系统需求

* 支持的操作系统有 Windows 7、Windows Vista、Windows Vista SP1、Windows XP SP2+、Windows Server 2003 SP1+、Windows Server 2008、Windows Server 2008 R2。
* 您必须具有实时的 Internet 连接。
* 您在计算机上必须具有管理员权限才能运行 Web 平台安装程序。

下载安装 Microsoft FastCGI Extension for IIS 5.1 and 6.0
1、下载
2、安装fcgisetup_1.5_rtw_x86.msi 如果您的iis是64位,安装64位对应版本。
3、配置fcigext.ini (在%WINDIR%\system32\inetsrv 目录里)
在fcigext.ini 末尾添加如下内容即可:
[Types]
php=PHP
[PHP]
ExePath=D:\php\php-cgi.exe (PHP目录)


  1. 安装FastCGI For IIS6以后,在C:\WINDOWS\system32\inetsrv 目录下会产生如下图所示的五个文件:

    同时在 IIS 的 “Web 服务扩展”里多了 FastCGI Handler。如图所示:

  2. 下载php,然后解压至 c:\PHP 目录(此路径根据个人喜好而定),并给 IIS 启动帐户组或用户赋予读取和运行权限。如下图:

  3. 注册 PHP 到 FastCGI,打开 C:\WINDOWS\system32\inetsrv\fcgiext.ini 文件,

    在 [Types] 下添加以下配置:

    [Types] php=PHP

    [PHP] ExePath=C:\PHP\php-cgi.exe

  4. 配置 php.ini

    将 C:\PHP\php-5.2.14-Win32\php.ini-recommended 复制一个,然后重命名为 D:\PHP\php.ini

    打开 C:\PHP\php-5.2.14-Win32\php.ini,修改:

    extension_dir = "C:\PHP\php-5.2.14-Win32\ext" fastcgi.impersonate = 1

    重启iis服务器

  5. 配置网站,右键网站 => 属性 => 主目录 => 配置 => 添加,如下图配置:

  6.  测试环境,在网站目录C:\inetpub\wwwroot下写个php文件,内容如下:

    <?php phpinfo(); ?>

    出现类似如图,说明环境经验ok了。


标签: IIS6

作者:admin 分类:HTML5及建站 浏览:655 评论:0
留言列表
发表评论
来宾的头像