View previous topic :: View next topic |
Author |
Message |
pkSML -
Joined: 29 May 2006 Posts: 952 Location: Michigan, USA
|
Posted: Wed Jun 07, 2006 5:23 am Post subject: FastCGI won't work |
|
|
I have tried to get FastCGI to work with my Perl scripts. It absolutely will not work.
Abyss version: Abyss/2.3.2-X2-Win32 AbyssLib/2.3.2
Perl version: 5.8.6
OS: Windows XP SP2 (Home edition)
I have installed the FCGI module.
In Abyss, I have tried both FastCGI interfaces (pipes and TCP/IP sockets).
The interpreter is c:\perl\bin\perl.exe.
The type is standard.
The associated extensions are pfl and fcgi.
Here is a sample script (test.fcgi): Code: | #!perl
use FCGI; # Imports the FastCGI library; required!!!
while (FCGI::accept >= 0) {
print "Content-type: text/html\n\n";
print "Hello world.";
}
|
This script just hangs and the server doesn't even produce any response headers.
Here is the error file with debugging level set to Processing Details: Code: | 07/Jun/2006:00:16:53 -0400 SUID: 0 server_init() = {mutex=1520/5f0}
07/Jun/2006:00:16:53 -0400 SUID: 0 server_bind() = {port=1024}
07/Jun/2006:00:16:53 -0400 SUID: 0 PUID: 0 process_init() = {event=1500/5dc}
07/Jun/2006:00:16:53 -0400 SUID: 0 PUID: 0 process_start(cmdline="C:\Perl\bin\perl.exe ") = OK
07/Jun/2006:00:16:53 -0400 SUID: 0 PUID: 0 RUID: 0 connect() = OK
07/Jun/2006:00:16:53 -0400 SUID: 0 PUID: 0 RUID: 0 send_table(type=9, size=56 bytes, items=3)
07/Jun/2006:00:16:53 -0400 SUID: 0 PUID: 0 RUID: 0 send_table_item(key="FCGI_MAX_CONNS", value="")
07/Jun/2006:00:16:53 -0400 SUID: 0 PUID: 0 RUID: 0 send_table_item(key="FCGI_MAX_REQS", value="")
07/Jun/2006:00:16:53 -0400 SUID: 0 PUID: 0 RUID: 0 send_table_item(key="FCGI_MPXS_CONNS", value="")
07/Jun/2006:00:16:53 -0400 SUID: 0 PUID: 0 RUID: 0 send_table_end()
07/Jun/2006:00:16:53 -0400 SUID: 0 PUID: 0 RUID: 0 send_table(type=9, size=8 bytes, items=0)
07/Jun/2006:00:16:53 -0400 SUID: 0 PUID: 0 RUID: 0 send_table_end()
|
If this file is renamed test.cgi, it will run on the CGI interface, and works just fine.
Has anyone else gotten FastCGI to work with Perl scripts under Windows? If so, how did you do it?
Any response would be appreciated. _________________ Stephen
Need a LitlURL?
http://CodeBin.yi.org |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Wed Jun 07, 2006 10:55 am Post subject: Re: FastCGI won't work |
|
|
pkSML,
Try using the same script with the CGI/ISAPI mode (FastCGI is backward compatible with CGI, so any FastCGI application will run as a CGI application too). After running it using CGI, check the cgi.log file for error messages. Is there an explicit error message there? _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
pkSML -
Joined: 29 May 2006 Posts: 952 Location: Michigan, USA
|
Posted: Wed Jun 07, 2006 7:21 pm Post subject: No CGI errors |
|
|
Aprelium, thanks for a quick response and the suggestion.
I renamed an fcgi script to cgi, and ran it. It did not produce an error.
Here is the script I ran: Code: | #!perl
use FCGI; # Imports the FastCGI library; required!!!
# Response loop
while (FCGI::accept >= 0) {
print "Content-type: text/html\n\n";
print "<PRE>";
foreach my $key (sort(keys(%ENV))) {print "$key = $ENV{$key}\n";}
print "</PRE>";
}
|
Here's the really weird quirk.
I ran the script as CGI and it worked just fine. No errors in the log. The second time I run that same script, it produced no errors in the log, but displayed this: Code: | 'E:\Website\fastcgi\nowork\env_var.cgi' script produced no output |
If I restart the server, this script will work once, but not the second time. Is there some process hanging maybe?
Thanks in advance. _________________ Stephen
Need a LitlURL?
http://CodeBin.yi.org |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Thu Jun 08, 2006 10:15 pm Post subject: Re: No CGI errors |
|
|
pkSML,
All our apologies. It seems that we gave you wrong instructions.
We will release tomorrow an add-on which will make Perl scripts (any script) support FastCGI. So please stay tuned. _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
aprelium-beta -
Joined: 24 Jun 2004 Posts: 383
|
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
|