FastCGI: can't use undefined value as filehandle reference

Hi,
I’m playing with fastcgi, but I’m getting an internal server error.

Logs say:
Can’t use an undefined value as filehandle reference at /usr/local/lib/perl5/site_perl/5.005/i386-freebsd/FCGI.pm line 75.
BEGIN failed–compilation aborted at /usr/libdata/perl/5.00503/CGI/Fast.pm line 22.
BEGIN failed–compilation aborted at /usr/local/rt2/bin/mason_handler.fcgi line 86.
[Wed Oct 24 10:58:48 2001] [warn] FastCGI: server “/usr/local/rt2/bin/mason_handler.fcgi” (pid 91013) terminated by calling exit with status ‘255’
[Wed Oct 24 10:58:50 2001] [warn] FastCGI: server “/usr/local/rt2/bin/mason_handler.fcgi” restarted (pid 91014)

Apache directives:
AddHandler fastcgi-script .fcgi
FastCgiServer /usr/local/rt2/bin/mason_handler.fcgi

ScriptAlias /rttest/ /usr/local/rt2/bin/mason_handler.fcgi/

I’m not running a virtual host.

I think this may actually be a problem with FCGI.pm, as the following script:
#!/usr/bin/perl
use CGI::Fast;

gives the following error:
Can’t use an undefined value as filehandle reference at /usr/local/lib/perl5/site_perl/5.005/i386-freebsd/FCGI.pm line 75.
BEGIN failed–compilation aborted at /usr/libdata/perl/5.00503/CGI/Fast.pm line 22.
BEGIN failed–compilation aborted at test line 2.

I’m using FCGI-0.64, mod_fastcgi_2.2.10, apache_1.3.22, perl 5.005_03, FreeBSD 4.1-STABLE.
mod_fastcgi is compiled into apache.

Any ideas if I’m doing something wrong with the config, or do I have a screwed fcgi installation?

Cheers,
-Feargal.

That looks to me like it could be a perl version requirements. Does the
version of FCGI you’re using require a more recent perl?

Marc Hedlund
e: marc at precipice dot orgOn Wed, 24 Oct 2001, Feargal Reilly wrote:

Hi,
I’m playing with fastcgi, but I’m getting an internal server error.

Logs say:
Can’t use an undefined value as filehandle reference at /usr/local/lib/perl5/site_perl/5.005/i386-freebsd/FCGI.pm line 75.
BEGIN failed–compilation aborted at /usr/libdata/perl/5.00503/CGI/Fast.pm line 22.
BEGIN failed–compilation aborted at /usr/local/rt2/bin/mason_handler.fcgi line 86.
[Wed Oct 24 10:58:48 2001] [warn] FastCGI: server “/usr/local/rt2/bin/mason_handler.fcgi” (pid 91013) terminated by calling exit with status ‘255’
[Wed Oct 24 10:58:50 2001] [warn] FastCGI: server “/usr/local/rt2/bin/mason_handler.fcgi” restarted (pid 91014)

Apache directives:
AddHandler fastcgi-script .fcgi
FastCgiServer /usr/local/rt2/bin/mason_handler.fcgi

ScriptAlias /rttest/ /usr/local/rt2/bin/mason_handler.fcgi/

I’m not running a virtual host.

I think this may actually be a problem with FCGI.pm, as the following script:
#!/usr/bin/perl
use CGI::Fast;

gives the following error:
Can’t use an undefined value as filehandle reference at /usr/local/lib/perl5/site_perl/5.005/i386-freebsd/FCGI.pm line 75.
BEGIN failed–compilation aborted at /usr/libdata/perl/5.00503/CGI/Fast.pm line 22.
BEGIN failed–compilation aborted at test line 2.

I’m using FCGI-0.64, mod_fastcgi_2.2.10, apache_1.3.22, perl 5.005_03, FreeBSD 4.1-STABLE.
mod_fastcgi is compiled into apache.

Any ideas if I’m doing something wrong with the config, or do I have a screwed fcgi installation?

Cheers,
-Feargal.


rt-devel mailing list
rt-devel@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-devel

Unfortunately no.
I didn’t really have the time to debug things, and since I have (had…) a
working RT, it was long fingered.
I did get one comment from someone on a fcgi list somewhere saying that the
FreeBSD ports version of the handler may be incompatible with the lasted
FCGI.pm, but I never got around to looking into it.

Double apologies, since I’m meant to be documenting RT in the first place :slight_smile:

-Feargal.

At 20:33 07/02/02, you wrote:

Hi Feargal,

I’m running into the same problem you describe below. Did you get it
resolved? Can you provide any advise? Any help greatly appreciated.

Thanks a lot,
Matthew

Hi,
I’m playing with fastcgi, but I’m getting an internal server error.

Logs say:
Can’t use an undefined value as filehandle reference at
/usr/local/lib/perl5/site_perl/5.005/i386-freebsd/FCGI.pm line 75.
BEGIN failed–compilation aborted at
/usr/libdata/perl/5.00503/CGI/Fast.pm line 22.
BEGIN failed–compilation aborted at
/usr/local/rt2/bin/mason_handler.fcgi line 86.
[Wed Oct 24 10:58:48 2001] [warn] FastCGI: server
“/usr/local/rt2/bin/mason_handler.fcgi” (pid 91013) terminated by calling
exit with status ‘255’
[Wed Oct 24 10:58:50 2001] [warn] FastCGI: server
“/usr/local/rt2/bin/mason_handler.fcgi” restarted (pid 91014)

Apache directives:
AddHandler fastcgi-script .fcgi
FastCgiServer /usr/local/rt2/bin/mason_handler.fcgi

ScriptAlias /rttest/ /usr/local/rt2/bin/mason_handler.fcgi/

I’m not running a virtual host.

I think this may actually be a problem with FCGI.pm, as the following
script:
#!/usr/bin/perl
use CGI::Fast;

gives the following error:
Can’t use an undefined value as filehandle reference at
/usr/local/lib/perl5/site_perl/5.005/i386-freebsd/FCGI.pm line 75.
BEGIN failed–compilation aborted at
/usr/libdata/perl/5.00503/CGI/Fast.pm line 22.
BEGIN failed–compilation aborted at test line 2.

I’m using FCGI-0.64, mod_fastcgi_2.2.10, apache_1.3.22, perl 5.005_03,
FreeBSD 4.1-STABLE.
mod_fastcgi is compiled into apache.

Any ideas if I’m doing something wrong with the config, or do I have a
screwed fcgi installation?

Cheers,
-Feargal.

Feargal Reilly.
http://www.helgrim.com/

Thanks for getting back to me Feargal.

I did bang my head against it until I got it fixed. Here’s what I changed in
FCGI.pm (starting at line 75):

# mkalastro@soe; added two lines below
open LISTEN_SOCK, "<&=0";
$self->{listen_sock} = \*LISTEN_SOCK;
# below croaked during compile: "Can't use an undefined value as filehandle

reference at FCGI.pm line 75"
#open $self->{listen_sock}, “<&=0”;
bless $self, “FCGI”;

Pretty simple and seemed to do the trick.

Thanks again,
MatthewOn 2/7/02 at 9:11pm, Feargal Reilly feargal@helgrim.com wrote:

|Unfortunately no.
|I didn’t really have the time to debug things, and since I have (had…) a
|working RT, it was long fingered.
|I did get one comment from someone on a fcgi list somewhere saying that the
|FreeBSD ports version of the handler may be incompatible with the lasted
|FCGI.pm, but I never got around to looking into it.
|
|Double apologies, since I’m meant to be documenting RT in the first place :slight_smile:
|
|-Feargal.
|
|At 20:33 07/02/02, you wrote:
|>Hi Feargal,
|>
|>I’m running into the same problem you describe below. Did you get it
|>resolved? Can you provide any advise? Any help greatly appreciated.
|>
|>Thanks a lot,
|>Matthew
|>
|> > Hi,
|> > I’m playing with fastcgi, but I’m getting an internal server error.
|> >
|> > Logs say:
|> > Can’t use an undefined value as filehandle reference at
|> /usr/local/lib/perl5/site_perl/5.005/i386-freebsd/FCGI.pm line 75.
|> > BEGIN failed–compilation aborted at
|> /usr/libdata/perl/5.00503/CGI/Fast.pm line 22.
|> > BEGIN failed–compilation aborted at
|> /usr/local/rt2/bin/mason_handler.fcgi line 86.
|> > [Wed Oct 24 10:58:48 2001] [warn] FastCGI: server
|> “/usr/local/rt2/bin/mason_handler.fcgi” (pid 91013) terminated by calling
|> exit with status ‘255’
|> > [Wed Oct 24 10:58:50 2001] [warn] FastCGI: server
|> “/usr/local/rt2/bin/mason_handler.fcgi” restarted (pid 91014)
|> >
|> > Apache directives:
|> > AddHandler fastcgi-script .fcgi
|> > FastCgiServer /usr/local/rt2/bin/mason_handler.fcgi
|> >
|> > ScriptAlias /rttest/ /usr/local/rt2/bin/mason_handler.fcgi/
|> >
|> > I’m not running a virtual host.
|> >
|> > I think this may actually be a problem with FCGI.pm, as the following
|> script:
|> > #!/usr/bin/perl
|> > use CGI::Fast;
|> >
|> > gives the following error:
|> > Can’t use an undefined value as filehandle reference at
|> /usr/local/lib/perl5/site_perl/5.005/i386-freebsd/FCGI.pm line 75.
|> > BEGIN failed–compilation aborted at
|> /usr/libdata/perl/5.00503/CGI/Fast.pm line 22.
|> > BEGIN failed–compilation aborted at test line 2.
|> >
|> > I’m using FCGI-0.64, mod_fastcgi_2.2.10, apache_1.3.22, perl 5.005_03,
|> FreeBSD 4.1-STABLE.
|> > mod_fastcgi is compiled into apache.
|> >
|> > Any ideas if I’m doing something wrong with the config, or do I have a
|> screwed fcgi installation?
|> >
|> > Cheers,
|> > -Feargal.
|> >
|
|Feargal Reilly.
|http://www.helgrim.com/
|
|