RE: Apache installation not accepting perl-script Handler
Works a treat Stas, thank you very much. Ironically I've been using mod perl for a long time, but I've never known that it had to have a PerlHandler of Apache::Registry... Mainly because the module discription states that the module is used for running existing mod_cgi scripts under mod_perl. I normally use mod_perl through Mason... which does the funky magic all on it's own. Cheers G > -Original Message- > From: Stas Bekman [mailto:[EMAIL PROTECTED] > Sent: 21 August 2003 21:39 > To: [EMAIL PROTECTED]; mod_perl Mailing List > Subject: Re: Apache installation not accepting perl-script Handler > > > [all modperl threads must be kept on the list unless > requested otherwise] > > Gareth Kirwan wrote: > > My original e-mail had the error as it appeared in the error log. > > > > 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 > > That's an error from mod_cgi, not mod_perl. > > > A perl-status on the server using Apache:Status returns to > prove that > > mod_perl is working, as I also posted in my first email. > > > > The relevant config looks like: > > > > > > > > > >SetHandler perl-script > >Options +ExecCGI > > > > > > > > Sure, you have a broken config. Have you read the documentation? > You miss the PerlHandler and PerlSendHeader directives > > http://perl.apache.org/docs/1.0/guide/getwet.html#Configuring_ > and_Starting_the_mod_perl_Server > > > __ > Stas BekmanJAm_pH --> Just Another mod_perl Hacker > http://stason.org/ mod_perl Guide ---> http://perl.apache.org > mailto:[EMAIL PROTECTED] 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 > -- 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
[all modperl threads must be kept on the list unless requested otherwise] Gareth Kirwan wrote: My original e-mail had the error as it appeared in the error log. 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 That's an error from mod_cgi, not mod_perl. A perl-status on the server using Apache:Status returns to prove that mod_perl is working, as I also posted in my first email. The relevant config looks like: SetHandler perl-script Options +ExecCGI Sure, you have a broken config. Have you read the documentation? You miss the PerlHandler and PerlSendHeader directives http://perl.apache.org/docs/1.0/guide/getwet.html#Configuring_and_Starting_the_mod_perl_Server __ Stas BekmanJAm_pH --> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] 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
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 BekmanJAm_pH --> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] 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
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:[EMAIL PROTECTED] *Sent:* 21 August 2003 10:23 *To:* [EMAIL PROTECTED] *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, [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> Tel: +44 (0) 1293 864 303 Thermeon Europe e-Card: gbjk <http://www.thermeoneurope.com/e-Card/?uid=gbjk> -- __ Stas BekmanJAm_pH --> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] 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
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:[EMAIL PROTECTED] > Sent: 21 August 2003 18:19 > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > 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:[EMAIL PROTECTED] > > *Sent:* 21 August 2003 10:23 > > *To:* [EMAIL PROTECTED] > > *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, > > [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > > Tel: +44 (0) 1293 864 303 > > Thermeon Europe e-Card: gbjk > > <http://www.thermeoneurope.com/e-Card/?uid=gbjk> > > > -- > > > __ > Stas BekmanJAm_pH --> Just Another mod_perl Hacker > http://stason.org/ mod_perl Guide ---> http://perl.apache.org > mailto:[EMAIL PROTECTED] 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
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/virtual/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:[EMAIL PROTECTED]Sent: 21 August 2003 10:23To: [EMAIL PROTECTED]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 KirwanProgramming & Development,Thermeon Europe Ltd,[EMAIL PROTECTED] Tel: +44 (0) 1293 864 303Thermeon Europe e-Card: gbjk
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 KirwanProgramming & Development,Thermeon Europe Ltd,[EMAIL PROTECTED] Tel: +44 (0) 1293 864 303Thermeon Europe e-Card: gbjk