[rt-users] RT3 failure after RH4 updates -- SOLVED
Stuart J. Browne
sjbrowne at bluebottle.com
Tue Nov 27 21:53:15 EST 2007
> > > We're using RT 3.6.0 with mod_perl-2.0.2, and up until
> > > yesterday, it was working fine.
> >
> > Make sure your Apache perl modules are up-to-date, in
> > particular the perl-libapreq2 RPM
>
> Never had that package installed.
>
> ... And as a follow-up, I found the package and installed it,
> still getting the same error ..
Was completely unrelated to this.
After trying this, I downgraded all the packages to their pre-update
versions, and tried it all again. It all failed, this time failing to find
the 'content_type' method of 'Apache2::RequestRec'.
So I went hunting. After muddling through the Wiki, and not really finding
anything suitable there, I went back to reading the mod_perl2 documentation,
and came across 'mod_perl 2.0 renaming'
(http://perl.apache.org/docs/2.0/rename.html).
At the bottom of the article, it mentions this:
"* In a script or module, replace Apache->request() by
Apache2::RequestUtil->request() and Apache->server() by
Apache2::ServerUtil->server()."
Having trawled through 'CGI.pm' yesterday, I noticed that this wasn't what
was happening after the update(s).
Even though the latest RHEL4 updates upgrades Perl to a different sub-build
within RH's source tree (5.8.5-36.el4_5.2 as against what we were using,
5.8.5-36.RHEL4), this of course replaces the version of 'CGI.pm' that's in
use with their distributed one, an old v3.05.
CGI.pm -> 3.05 (as distributed with the EL4 'perl' RPM):
314: if ($MOD_PERL) {
315: $self->r(Apache->request) unless $self->r;
316: my $r = $self->r;
317: if ($MOD_PERL == 1) {
318: $r->register_cleanup(\&CGI::_reset_globals);
319: }
320: else {
321: # XXX: once we have the new API
322: # will do a real PerlOptions -SetupEnv check
323: $r->subprocess_env unless exists $ENV{REQUEST_METHOD};
324: $r->pool->cleanup_register(\&CGI::_reset_globals);
325: }
326: undef $NPH;
327: }
In newer versions of CGI.pm (3.29 in this case), it looks like this:
350: if ($MOD_PERL) {
351: if ($MOD_PERL == 1) {
352: $self->r(Apache->request) unless $self->r;
353: my $r = $self->r;
354: $r->register_cleanup(\&CGI::_reset_globals);
355: }
356: else {
357: # XXX: once we have the new API
358: # will do a real PerlOptions -SetupEnv check
359: $self->r(Apache2::RequestUtil->request) unless $self->r;
360: my $r = $self->r;
361: $r->subprocess_env unless exists $ENV{REQUEST_METHOD};
362: $r->pool->cleanup_register(\&CGI::_reset_globals);
363: }
364: undef $NPH;
365: }
It seems somewhere in the past, I upgraded 'CGI.pm' (and associated other
pieces) to a newer mod_perl2 happy version, and didn't write it down in an
obvious place.
Anyway, thanks to all who read this thead.
Stuart Browne
More information about the rt-users
mailing list