Joshua Keroes wrote:

Hello mod_perl folks:

I'm having some trouble getting the MasonHQ SiteSource code to run. Looks like a mod_perl/CGI issue is the culprit.

This is what happens when I fire up Apache. (svrctl is a glorified apachectl.)

[EMAIL PROTECTED]:/usr/local/anansi$ sudo bin/svrctl start dev
Password:
starting dev
[Wed May 12 09:40:17 2004] [error] Can't call method "register_cleanup"
on an undefined value at /usr/local/share/perl/5.8.3/CGI.pm line 318.\n
Compilation failed in require at /usr/local/anansi/conf/handler-dev.pl line 12.\n
Compilation failed in require at (eval 4) line 1.\n
Syntax error on line 4 of /usr/local/anansi/conf/httpd-dev.conf:
Can't call method "register_cleanup" on an undefined value at
/usr/local/share/perl/5.8.3/CGI.pm line 318.
Compilation failed in require at /usr/local/anansi/conf/handler-dev.pl
line 12.
Compilation failed in require at (eval 4) line 1.


dev could not be started
[EMAIL PROTECTED]:/usr/local/anansi$  head -4 conf/httpd-dev.conf | tail -1
PerlScript /usr/local/anansi/conf/handler-dev.pl
[EMAIL PROTECTED]:/usr/local/anansi$



Per Jonathan Swartz's advice, I replaced handler-dev.pl with a Hello World handler and tried again:


   #!/usr/bin/perl
   use CGI;
   use strict;

   my $cgi = new CGI ({});

   sub handler
   {
       my ($r) = @_;

       $r->send_http_header;
       $r->print("Hello world!");

       return 200;
   }


Same error.

You can't cache CGI objects used for request parsing. Move that

  my $cgi = new CGI ({});

*inside* the handler. Apache->request is obviously not available at startup time.

And you really want to start using the new syntax, CGI->new($r), since you will want it for mp2 when you move to it.

--
__________________________________________________________________
Stas Bekman            JAm_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

--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Reply via email to