FastCGI won't work

 
Post new topic   Reply to topic    Aprelium Forum Index -> Perl
View previous topic :: View next topic  
Author Message
pkSML
-


Joined: 29 May 2006
Posts: 873
Location: Michigan, USA

PostPosted: Wed Jun 07, 2006 5:23 am    Post subject: FastCGI won't work Reply with quote

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 View user's profile Send private message Visit poster's website
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Wed Jun 07, 2006 10:55 am    Post subject: Re: FastCGI won't work Reply with quote

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 View user's profile Send private message Send e-mail
pkSML
-


Joined: 29 May 2006
Posts: 873
Location: Michigan, USA

PostPosted: Wed Jun 07, 2006 7:21 pm    Post subject: No CGI errors Reply with quote

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 View user's profile Send private message Visit poster's website
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Thu Jun 08, 2006 10:15 pm    Post subject: Re: No CGI errors Reply with quote

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 View user's profile Send private message Send e-mail
aprelium-beta
-


Joined: 24 Jun 2004
Posts: 383

PostPosted: Fri Jun 09, 2006 5:13 pm    Post subject: Re: No CGI errors Reply with quote

pkSML,

Please check the new thread http://www.aprelium.com/forum/viewtopic.php?t=9014 .
_________________
Beta Testing Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> Perl All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group