【发布时间】:2011-05-20 21:33:31
【问题描述】:
我正在尝试让 Perl/FastCGI (FCGI) 与 IIS 7.5 一起运行。 C:\Windows\System32\inetsrv\iisfcgi.dll 的版本是7.5.7601.17514。这是我的web.config 和我的 Perl 脚本:
D:\MiLu\Dev :: more /t1 web.config
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<directoryBrowse enabled="true" />
<handlers>
<add name="FCGI" path="*.pl" verb="*"
modules="FastCgiModule"
scriptProcessor="C:\Opt\Cygwin\bin\perl.exe"
resourceType="Unspecified" requireAccess="Script" />
</handlers>
</system.webServer>
</configuration>
D:\MiLu\Dev :: more /t4 Perl\fcgi\count.pl
use strict;
use warnings;
use FCGI;
my $count = 0;
my $request = FCGI::Request();
while ( $request->Accept >= 0 ) {
print "Content-type: text/html\r\n\r\n", ++$count;
}
我得到的只是一个 500,带有来自 IIS 的通用错误页面,说明“FastCGI 进程意外退出”并列出可能的错误原因。
脚本在命令行下运行正常,打印了三行,然后立即退出,说明脚本和模块安装没问题。 (顺便说一下,我是从FCGI manual复制过来的,应该没问题。)
D:\MiLu\Dev :: C:\Opt\Cygwin\bin\perl.exe Perl\fcgi\count.pl
Content-type: text/html
1
有一个FCGI::IIS module,但是,它似乎只适用于 IIS 5.1 和 6.0。
IIS 有一个专用的 FCGI 模块这一事实表明 IIS 5.1 和 6.0 提供了它们自己的非标准 FCGI 实现。那么如果这是真的,那么 IIS 7.5 呢?相当多的不确定性。
FCGI::IISseems to have tried to make his module work with IIS 7.0 (Getting Perl working on IIS7 with FastCGI - 2007)的作者,但是放弃了。
我在哪里可以找到更具体的错误信息?有日志文件吗?我应该在 Windows 事件查看器 (eventvwr) 中寻找什么?
我缺少一些关于 IIS 的魔法咒语吗?
关于这种组合的信息并不多。但它最终可能会奏效。这里有FastCGI Application configuration reference page,还有someone has got Catalyst to work with FastCGI on IIS 7.0 (Catalyst+IIS 7.0 on MS Windows 2008/Vista)。
【问题讨论】: