"Richard L. Goerwitz" <[EMAIL PROTECTED]> wrote:
>Before I turn everything inside out, let me ask a quick question: Has
>anyone encountered problems using CGI and CGI::Cookie with mod_perl? The
>Problem I am noticing emanates from CGI->new(). Here's the section of
>code:
>
> if ($MOD_PERL) {
> Apache->request->register_cleanup(\&CGI::_reset_globals);
> undef $NPH;
> }
>
>The error I'm seeing is (taken from my Apache log files):
>
>Wed Jan 19 11:33:45 2000] [error] Can't call method "register_cleanup" on an
>undefined value at /usr/lib/perl5/5.00503/CGI.pm line 263.
>
>Platform: RedHat Linux 6.1 + from-scratch build of Apache 1.3.9, mod_perl
>1.21
I have seen this with a build from .tar.gz on OpenBSD 2.5 also with
Apache/1.3.6 (Unix) mod_perl/1.21. Slightly older Apache, but I don't think
that's the problem.
I have never seen a good pattern to this, but there are times when the Apache->
request object is undefined in a mod_perl handler. Sometimes, calling Apache->
request($r) immediately upon entering a handler will fix it, sometimes even
that won't work ($r is sometimes underfined when entering a handler).
--
James Smith <[EMAIL PROTECTED]>, 409-862-3725
Texas A&M CIS Operating Systems Group, Unix