[rt-users] rt-3.4.4 and mod_perl2

Myra Chachkin myra at ack.Berkeley.EDU
Wed Sep 21 13:57:13 EDT 2005


Hi RT folks,

Does anyone have rt-3.4.4 working with apache2 and mod_perl2 
(mod_perl2-2.0.1, not 1.99)?  I'm attempting an upgrade and I'm 
a bit stumped.  I got the latest 5.4-stable FreeBSD and rebuilt 
everything successfully, including rt-3.4.4.  But on starting 
httpd, I see this error in the apache log:

[error] Can't locate Apache2.pm in @INC (@INC contains [snip])
at /usr/local/lib/perl5/site_perl/5.8.7/HTML/Mason/ApacheHandler.pm line 270.\nBEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/5.8.7/HTML/Mason/ApacheHandler.pm line 281.\nCompilation failed in require at /usr/local/rt3/lib/RT/Interface/Web/Handler.pm line 146.\nCompilation failed in require at (eval 177) line 1.\n
[error] Can't load Perl file: /usr/local/rt3/bin/webmux.pl

So, in HTML::Mason::ApacheHandler.pm, here's the problem spot:

-------------------------------------------------------------------
use constant APACHE2    => $mod_perl::VERSION >= 1.99;
use constant OK         => 0;
use constant DECLINED   => -1;
use constant NOT_FOUND  => 404;
use constant REDIRECT   => 302;

BEGIN {
        if (APACHE2) {
                require Apache2;
                Apache2->import();
                require Apache::RequestRec;
                require Apache::RequestIO;
                require Apache::ServerUtil;
                require Apache::Log;
                require APR::Table;
        } else {
                require Apache;
                Apache->import();
        }
}
-------------------------------------------------------------------

I thought that after the mod_perl "great renaming" API change with 
mod_perl 2.x, the "require Apache2" is obsolete and the Apache::x and 
other modules are being ported to the new API and renamed Apache2::x.  
I have this directory in my perl @INC: 
  /usr/local/lib/perl5/site_perl/5.8.7/mach/ 
But, there's no Apache2.pm in there, of course; just an Apache2 
directory containing all the individual modules in the new Apache2::x
namespace (Const.pm, etc).

So, the ApacheHandler.pm code looks to me like it only works for people 
running 1.99 MP2 and using "use Apache2" and "use Apache::compat".  
Has Mason not been fully ported to mod_perl2.x?  I don't see how this
can be, sincE rt-3.4.4 is supposed to support mod_perl2.x now.  What 
am I misunderstanding?

Here's the mod_perl documentation that says to remove "use Apache2":
  http://perl.apache.org/docs/2.0/rename.html

Also, I did see these threads on rt-users:
  http://lists.bestpractical.com/pipermail/rt-users/2005-August/033087.html
  http://lists.bestpractical.com/pipermail/rt-users/2005-August/033467.html
  http://lists.bestpractical.com/pipermail/rt-users/2005-July/032445.html

but haven't seen anybody saying that it's working.  Is it possible?

Thanks in advance,
Myra



More information about the rt-users mailing list