You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Gareth Kirwan <gb...@thermeoneurope.com> on 2003/08/21 11:23:19 UTC
Apache installation not accepting perl-script Handler
I have a mod perl installation, but it won't accept a perl-script handler.
In a Location directive I set the handler to perl-script. It fails to
execute the test file properly.
I set it to cgi-script and it executes the file fine ( though I get
complaints about doing Apache->request aftter loading the Apache module )
I have perl-status running on the server, and it returns fine:
Embedded Perl version v5.8.0 for Apache/1.3.27 (Unix) mod_gzip/1.3.26.1a
mod_perl/1.27 mod_ssl/2.8.12 OpenSSL/0.9.6h
The loaded modules section shows Apache and Apache::Request to be loaded.
Any ideas ?
Thanks
Gareth Kirwan
Programming & Development,
Thermeon Europe Ltd,
gbjk@thermeoneurope.com
Tel: +44 (0) 1293 864 303
Thermeon Europe e-Card: gbjk
Re: Apache installation not accepting perl-script Handler
Posted by Stas Bekman <st...@stason.org>.
Gareth Kirwan wrote:
> I'm not using Apache 2.0
>
> I'm using Apache 1.3.
>
> It seems that the url you posted:
> http://perl.apache.org/docs/2.0/user/porting/porting.html#Using_C_ModPerl__M
> ethodLookup__to_Discover_Which_mod_perl_2_0_Modules_Need_to_Be_Loaded
> Relates specifically to Apache 2.0 and mod_perl 2 ?
yes, my fault.
>>>
>>>Can't locate object method "request" via package "Apache" at
>>>/u/virtual/devel.*****.com/perl-
>>>bin/Inslink.pl line 8.
>>>[Thu Aug 21 10:31:07 2003] [error] [client 192.168.234.85]
>>
>>Premature end
>>
>>>of script headers: /u/virtu
>>>al/devel.*****.com/perl-bin/Inslink.pl
Sure, that won't work under mod_cgi. I can't figure out from your original
post what did you mean when you said:
I have a mod perl installation, but it won't accept a perl-script handler.
In a Location directive I set the handler to perl-script. It fails to
execute the test file properly.
Don't try to interpret the errors, we need to see the errors as they were
reported by Apache.
You also need to post the relevant config section.
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
RE: Apache installation not accepting perl-script Handler
Posted by Gareth Kirwan <gb...@thermeoneurope.com>.
I'm not using Apache 2.0
I'm using Apache 1.3.
It seems that the url you posted:
http://perl.apache.org/docs/2.0/user/porting/porting.html#Using_C_ModPerl__M
ethodLookup__to_Discover_Which_mod_perl_2_0_Modules_Need_to_Be_Loaded
Relates specifically to Apache 2.0 and mod_perl 2 ?
Thanks
G
> -----Original Message-----
> From: Stas Bekman [mailto:stas@stason.org]
> Sent: 21 August 2003 18:19
> To: gbjk@thermeoneurope.com
> Cc: modperl@perl.apache.org
> Subject: Re: Apache installation not accepting perl-script Handler
>
>
> When reporting problems, please *always* follow the guidelines:
> http://use.perl.org/bugs/
>
> > BTW - The script looks like this:
> >
> > #!/usr/local/bin/perl -w
> >
> > use strict;
> > use Apache;
> >
> > print "Content-Type: text/html";
>
> that has to be:
>
> print "Content-Type: text/html\n\n";
>
> > my $r = Apache->request;
> >
> > 1;
> >
> > and the error looks like this:
> >
> > Can't locate object method "request" via package "Apache" at
> > /u/virtual/devel.*****.com/perl-
> > bin/Inslink.pl line 8.
> > [Thu Aug 21 10:31:07 2003] [error] [client 192.168.234.85]
> Premature end
> > of script headers: /u/virtu
> > al/devel.*****.com/perl-bin/Inslink.pl
>
> You need to load
> use Apache::RequestUtil ();
>
> See:
> http://perl.apache.org/docs/2.0/user/porting/porting.html#Usin
> g_C_ModPerl__MethodLookup__to_Discover_Which_mod_perl_2_0_Modu
> les_Need_to_Be_Loaded
>
> > Notice it didn't fail on loading the Apache module, just
> on calling the
> > request method.
> >
> > Cheers
> >
> > G
> >
> > -----Original Message-----
> > *From:* Gareth Kirwan [mailto:gbjk@thermeoneurope.com]
> > *Sent:* 21 August 2003 10:23
> > *To:* modperl@perl.apache.org
> > *Subject:* Apache installation not accepting perl-script Handler
> >
> > I have a mod perl installation, but it won't accept a
> perl-script
> > handler.
> > In a Location directive I set the handler to
> perl-script. It fails
> > to execute the test file properly.
> > I set it to cgi-script and it executes the file fine (
> though I get
> > complaints about doing Apache->request aftter loading the Apache
> > module )
> >
> > I have perl-status running on the server, and it returns fine:
> > Embedded Perl version *v5.8.0* for *Apache/1.3.27 (Unix)
> > mod_gzip/1.3.26.1a mod_perl/1.27 mod_ssl/2.8.12 OpenSSL/0.9.6h*
> > **
> > The loaded modules section shows Apache and
> Apache::Request to be
> > loaded.
> >
> > Any ideas ?
> >
> > Thanks
> >
> > Gareth Kirwan
> > Programming & Development,
> > Thermeon Europe Ltd,
> > gbjk@thermeoneurope.com <ma...@thermeoneurope.com>
> > Tel: +44 (0) 1293 864 303
> > Thermeon Europe e-Card: gbjk
> > <http://www.thermeoneurope.com/e-Card/?uid=gbjk>
>
>
> --
>
>
> __________________________________________________________________
> Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
> http://stason.org/ mod_perl Guide ---> http://perl.apache.org
> mailto:stas@stason.org http://use.perl.org http://apacheweek.com
> http://modperlbook.org http://apache.org http://ticketmaster.com
>
--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
Re: Apache installation not accepting perl-script Handler
Posted by Stas Bekman <st...@stason.org>.
When reporting problems, please *always* follow the guidelines:
http://use.perl.org/bugs/
> BTW - The script looks like this:
>
> #!/usr/local/bin/perl -w
>
> use strict;
> use Apache;
>
> print "Content-Type: text/html";
that has to be:
print "Content-Type: text/html\n\n";
> my $r = Apache->request;
>
> 1;
>
> and the error looks like this:
>
> Can't locate object method "request" via package "Apache" at
> /u/virtual/devel.*****.com/perl-
> bin/Inslink.pl line 8.
> [Thu Aug 21 10:31:07 2003] [error] [client 192.168.234.85] Premature end
> of script headers: /u/virtu
> al/devel.*****.com/perl-bin/Inslink.pl
You need to load
use Apache::RequestUtil ();
See:
http://perl.apache.org/docs/2.0/user/porting/porting.html#Using_C_ModPerl__MethodLookup__to_Discover_Which_mod_perl_2_0_Modules_Need_to_Be_Loaded
> Notice it didn't fail on loading the Apache module, just on calling the
> request method.
>
> Cheers
>
> G
>
> -----Original Message-----
> *From:* Gareth Kirwan [mailto:gbjk@thermeoneurope.com]
> *Sent:* 21 August 2003 10:23
> *To:* modperl@perl.apache.org
> *Subject:* Apache installation not accepting perl-script Handler
>
> I have a mod perl installation, but it won't accept a perl-script
> handler.
> In a Location directive I set the handler to perl-script. It fails
> to execute the test file properly.
> I set it to cgi-script and it executes the file fine ( though I get
> complaints about doing Apache->request aftter loading the Apache
> module )
>
> I have perl-status running on the server, and it returns fine:
> Embedded Perl version *v5.8.0* for *Apache/1.3.27 (Unix)
> mod_gzip/1.3.26.1a mod_perl/1.27 mod_ssl/2.8.12 OpenSSL/0.9.6h*
> **
> The loaded modules section shows Apache and Apache::Request to be
> loaded.
>
> Any ideas ?
>
> Thanks
>
> Gareth Kirwan
> Programming & Development,
> Thermeon Europe Ltd,
> gbjk@thermeoneurope.com <ma...@thermeoneurope.com>
> Tel: +44 (0) 1293 864 303
> Thermeon Europe e-Card: gbjk
> <http://www.thermeoneurope.com/e-Card/?uid=gbjk>
--
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
RE: Apache installation not accepting perl-script Handler
Posted by Gareth Kirwan <gb...@thermeoneurope.com>.
BTW - The script looks like this:
#!/usr/local/bin/perl -w
use strict;
use Apache;
print "Content-Type: text/html";
my $r = Apache->request;
1;
and the error looks like this:
Can't locate object method "request" via package "Apache" at
/u/virtual/devel.*****.com/perl-
bin/Inslink.pl line 8.
[Thu Aug 21 10:31:07 2003] [error] [client 192.168.234.85] Premature end of
script headers: /u/virtu
al/devel.*****.com/perl-bin/Inslink.pl
Notice it didn't fail on loading the Apache module, just on calling the
request method.
Cheers
G
-----Original Message-----
From: Gareth Kirwan [mailto:gbjk@thermeoneurope.com]
Sent: 21 August 2003 10:23
To: modperl@perl.apache.org
Subject: Apache installation not accepting perl-script Handler
I have a mod perl installation, but it won't accept a perl-script handler.
In a Location directive I set the handler to perl-script. It fails to
execute the test file properly.
I set it to cgi-script and it executes the file fine ( though I get
complaints about doing Apache->request aftter loading the Apache module )
I have perl-status running on the server, and it returns fine:
Embedded Perl version v5.8.0 for Apache/1.3.27 (Unix) mod_gzip/1.3.26.1a
mod_perl/1.27 mod_ssl/2.8.12 OpenSSL/0.9.6h
The loaded modules section shows Apache and Apache::Request to be loaded.
Any ideas ?
Thanks
Gareth Kirwan
Programming & Development,
Thermeon Europe Ltd,
gbjk@thermeoneurope.com
Tel: +44 (0) 1293 864 303
Thermeon Europe e-Card: gbjk