You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Tyler MacDonald <ty...@yi.org> on 2005/10/26 18:56:45 UTC
bizarre mp2 behaviour
I recently made the move from mod_perl 1.99 to mod_perl 2.0.2. After a bit
of porting (changing Apache:: to Apache2::, etc), everything seemed to be
working fairly well. But then some bizarre things started happening.
About 1 in 50 times, a page will fail to load with "internal server error".
The error logs show some *very* weird errors:
failed to resolve handler `ModPerl::Registry': Global symbol "$base"
requires explicit package name at /usr/share/perl/5.8/base.pm line
19.\nCompilation failed in require at
/opt/apache2/perl5lib/i486-linux-gnu-thread-multi/ModPerl/Registry.pm line
25.\nBEGIN failed--compilation aborted at
/opt/apache2/perl5lib/i486-linux-gnu-thread-multi/ModPerl/Registry.pm line
25.\nCompilation failed in require at (eval 60) line 3.\n
And stuff like this:
Global symbol "$r" requires explicit package name at
/opt/weedns-4/skins/yi/perl5lib/yi/page/css.pm line 16.\nCompilation failed
in require at /opt/weedns-4/skins/yi/htdocs/css.pl line 6.\nBEGIN
failed--compilation aborted at /opt/weedns-4/skins/yi/htdocs/css.pl line
6.\n
Here's lines 14 - 20 of css.pm:
14 - sub handler {
15 - my($class, $r) = @_;
16 - $r->content_type("text/html");
17 - $r->print("<LINK REL=\"STYLESHEET\" TYPE=\"text/css\" HREF=\"/yi.css\" />\n");
18 - $r->status(OK);
19 - return OK;
20 - }
Has anybody else run into this? Did I do something wrong? Everything ran
fine under mod_perl 1.99, and essentially all I've changed is using
Apache2:: namespaces instead of Apache:: namespaces.
Any help at all would be appreciated.
Thanks,
Tyler
Re: bizarre mp2 behaviour
Posted by Tyler MacDonald <ty...@yi.org>.
Philip M. Gollucci <pg...@p6m7g8.com> wrote:
> Tyler MacDonald wrote:
> >17 - $r->print("<LINK REL=\"STYLESHEET\" TYPE=\"text/css\"
> >HREF=\"/yi.css\" />\n");
> I know this doesn't answer your question, but it popped out at me that
> you're using xhtml /> syntax, but your attributes (REL, TYPE, HREF) and
> tags(LINK) are in caps which conflicts.
I guess my brain was operating in quirks mode. ;-)
- Tyler
Re: bizarre mp2 behaviour
Posted by "Philip M. Gollucci" <pg...@p6m7g8.com>.
Tyler MacDonald wrote:
> 17 - $r->print("<LINK REL=\"STYLESHEET\" TYPE=\"text/css\" HREF=\"/yi.css\" />\n");
I know this doesn't answer your question, but it popped out at me that you're
using xhtml /> syntax, but your attributes (REL, TYPE, HREF) and tags(LINK) are
in caps which conflicts.
--
END
------------------------------------------------------------
What doesn't kill us can only make us stronger.
Nothing is impossible.
Philip M. Gollucci (pgollucci@p6m7g8.com) 301.254.5198
Consultant / http://p6m7g8.net/Resume/
Senior Developer / Liquidity Services, Inc.
http://www.liquidityservicesinc.com
http://www.liquidation.com
http://www.uksurplus.com
http://www.govliquidation.com
http://www.gowholesale.com
Re: bizarre mp2 behaviour
Posted by Tyler MacDonald <ty...@yi.org>.
Philip M. Gollucci <pg...@p6m7g8.com> wrote:
> Tyler MacDonald wrote:
> >Global symbol "$r" requires explicit package name at
> >/opt/weedns-4/skins/yi/perl5lib/yi/page/css.pm line 16.\nCompilation failed
> >in require at /opt/weedns-4/skins/yi/htdocs/css.pl line 6.\nBEGIN
> >failed--compilation aborted at /opt/weedns-4/skins/yi/htdocs/css.pl line
> >6.\n
> >
> >
> >Here's lines 14 - 20 of css.pm:
> >
> >14 - sub handler {
> >15 - my($class, $r) = @_;
> >16 - $r->content_type("text/html");
> >17 - $r->print("<LINK REL=\"STYLESHEET\" TYPE=\"text/css\"
> >HREF=\"/yi.css\" />\n");
> >18 - $r->status(OK);
> >19 - return OK;
> >20 - }
> Can you show lines 1-14 and the httpd.conf section for this handler ?
css.pl used to contain all of the code and the error still happened
-- as part of troubleshooting I started working on moving away from
depending on ModPerl::Registry...
Entire file attached, and the file that calls it is attached as
well. The handler is ModPerl::Registry. css.pl/.pm was just an example, this
happens intermittently on just about every registry script that runs. :-(
There's only one thing that I'm doing that's some might consider unusual:
<Files "*.pl">
Options +ExecCGI
PerlResponseHandler ModPerl::Registry
SetHandler perl-script
SetOutputFilter INCLUDES
</Files>
That is, using the INCLUDES output filter to post-process the
perl output. That said, this worked beautifully in mod_perl 1.99, and that
happens on the C side away from perl, so it shouldn't make a difference,
should it?
- Tyler
Re: bizarre mp2 behaviour
Posted by "Philip M. Gollucci" <pg...@p6m7g8.com>.
Tyler MacDonald wrote:
> Global symbol "$r" requires explicit package name at
> /opt/weedns-4/skins/yi/perl5lib/yi/page/css.pm line 16.\nCompilation failed
> in require at /opt/weedns-4/skins/yi/htdocs/css.pl line 6.\nBEGIN
> failed--compilation aborted at /opt/weedns-4/skins/yi/htdocs/css.pl line
> 6.\n
>
>
> Here's lines 14 - 20 of css.pm:
>
> 14 - sub handler {
> 15 - my($class, $r) = @_;
> 16 - $r->content_type("text/html");
> 17 - $r->print("<LINK REL=\"STYLESHEET\" TYPE=\"text/css\" HREF=\"/yi.css\" />\n");
> 18 - $r->status(OK);
> 19 - return OK;
> 20 - }
Can you show lines 1-14 and the httpd.conf section for this handler ?
--
END
------------------------------------------------------------
What doesn't kill us can only make us stronger.
Nothing is impossible.
Philip M. Gollucci (pgollucci@p6m7g8.com) 301.254.5198
Consultant / http://p6m7g8.net/Resume/
Senior Developer / Liquidity Services, Inc.
http://www.liquidityservicesinc.com
http://www.liquidation.com
http://www.uksurplus.com
http://www.govliquidation.com
http://www.gowholesale.com