I've seen this problem and never got to the bottom of
it, on a redhat box with 5.8.3 (I think) and same
apache and mod_perl,
Marty
--- Andrew Green <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I seem to have a bizarre problem with method
> handlers on my setup. I
> have a set of different handlers, all of which are
> method handlers so
> that I can easily inherit shared code across a
> collection of different
> installations of my application on the same server.
>
> The first handler to get invoked is a
> PerlTransHandler -- everything
> works fine (or at least seems to) for quite some
> time, but then the
> handler begins "forgetting" that it's a method
> handler, and instead of
> the class being passed before $r, $r becomes the
> first thing passed.
> At least, that seems to be what's happening. Is
> this a known problem?
>
> My setup is as follows:
>
> Perl 5.8.0 (Red Hat EL 3 default)
> Apache/1.3.29
> mod_perl/1.29
>
>
> Here's what I imagine to be the relevant bits of
> httpd.conf:
>
> MinSpareServers 10
> MaxSpareServers 20
> StartServers 10
> MaxClients 60
> MaxRequestsPerChild 1000
> ...
> <VirtualHost xxx>
> PerlTransHandler MyApp::MyInstall::Dispatcher
> ...
>
>
> Here's the relevant bits of Dispatcher.pm:
>
> package MyApp::MyInstall::Dispatcher;
>
> use strict;
> use Apache::Constants qw(OK DECLINED NOT_FOUND
> REDIRECT FORBIDDEN);
> use Apache::URI;
>
> our @ISA = qw(MyApp::Core::Dispatcher);
>
> 1;
>
> ####
>
> sub handler ($$) {
>
> my ($class,$r) = @_;
> return DECLINED unless ($r->is_initial_req());
> ...
>
>
> And here's the error (that only starts appearing
> after the server's
> been running for a while:
>
> Can't call method "is_initial_req" on an undefined
> value...
>
> The error then points to the line quoted above. Of
> course, Apache
> never gets to other handlers later in the sequence,
> so I can't easily
> see whether the problem is limited to TransHandlers,
> or whether all my
> method handlers would stop acting as such.
> Restarting the server makes
> the problem go away -- for a while!
>
> I'd really like to avoid having to upgrade/change
> Perl or mod_perl if
> at all possible. Nonetheless, any help, advice or
> guidance anyone can
> provide would be very much appreciated.
>
> Cheers,
> Andrew.
>
___________________________________________________________
ALL-NEW Yahoo! Messenger - all new features - even more fun!
http://uk.messenger.yahoo.com