[rt-users] RT3, Apache2, mod_perl2 success stories?

Aaron Paetznick aaronp at critd.com
Fri May 16 10:21:33 EDT 2003


This worked (thanks!), but now I'm getting a new error:

[Fri May 16 14:09:43 2003] [warning]: [Mason] Cannot resolve file to 
component: /usr/local/www/resources/RequestTracker/share/html/index.html 
(is file outside component root?) at 
/usr/lib/perl5/site_perl/5.8.0/HTML/Mason/ApacheHandler.pm line 838.
  (/usr/local/www/resources/RequestTracker-3.0.2/lib/RT.pm:226)


I verified that lib/RT.pm has $MasonComponentRoot defined correctly to 
'/usr/local/www/resources/RequestTracker-3.0.2/share/html'.  I'm trying 
to Alias RT into my site from outside my DocumentRoot.  Here is my config:

  PerlModule Apache2 Apache::compat
  PerlModule Apache::DBI
  PerlRequire /usr/local/www/resources/RequestTracker/bin/webmux.pl
  Alias /tracker /usr/local/www/resources/RequestTracker/share/html
  <Location /tracker>
    AddDefaultCharset UTF-8
    SetHandler perl-script
    PerlHandler RT::Mason
  </Location>


...any ideas on this new error?  Thanks!


--Aaron



Brook Schofield wrote:
> rt-users-admin at lists.fsck.com wrote on 14/05/2003 12:56:55 PM:
> 
>>I'm trying to get RequestTracker v3.0.2, Apache v2.0.45, and mod_perl 
>>v1.99_09 to work together.  Previous posts to the mailing list have had 
>>similar problems, but no resolution.  I know this combo isn't 
>>recommended, but it _should_ work, right?  Here is my config:
>>
>>PerlRequire /usr/local/www/resources/RequestTracker/bin/webmux.pl
>>Alias /tracker /usr/local/www/resources/RequestTracker/share/html
>><Location /tracker>
>>   AddDefaultCharset UTF-8
>>   SetHandler perl-script
>>   PerlHandler +RT::Mason
>>   PerlOptions +GlobalRequest
>></Location>
>>
>>...this makes Apache fail to start.  Here's the error:
>>
>>[Tue May 13 21:45:31 2003] [error] Global $r object is not available. 
> 
> Set:
> 
>>         PerlOptions +GlobalRequest
>>in httpd.conf at 
>>/usr/lib/perl5/site_perl/5.8.0/HTML/Mason/ApacheHandler.pm line 569.
>>Compilation failed in require at (eval 221) line 1.
>>
>>[Tue May 13 21:45:31 2003] [error] Can't load Perl file: 
>>/usr/local/www/resources/RequestTracker/bin/webmux.pl for server 
>>www.critd.com:0, exiting...
>>
>>
>>...any ideas?  Is anybody running these versions successfully?  Any 
>>suggestions?  Thanks!
> 
> 
> I posted the following to rt-devel last night ;-)
> 
> This is a change in behaviour between Mod_Perl 1.99_08 and 1.99_09 
> (I've been using 1.99_07). I don't know whether this has gone away in 
> later versions of HTML::Mason (I'm still using 1.17 rather than 1.20) 
> but I needed to add the following to /opt/rt3/bin/webmux.pl to get 
> everything working. I don't know what changes need to be made so this 
> can be more universally applied to Mod_Perl 1 and Mod_Perl 2 instances.
> 
> # diff -c bin/webmux.pl /opt/rt3/bin/webmux.pl | more
> *** bin/webmux.pl       Tue May 13 21:09:36 2003
> --- /opt/rt3/bin/webmux.pl      Tue May 13 21:19:23 2003
> ***************
> *** 33,38 ****
> --- 33,48 ----
>        $ENV{'IFS'}    = '' if defined $ENV{'IFS'};
>    }
> 
> + require Apache::RequestUtil;
> + no warnings 'redefine';
> + my $sub = *Apache::request{CODE};
> + *Apache::request = sub {
> +     my $r;
> +     eval { $r = $sub->('Apache'); };
> +     # warn $@ if $@;
> +     return $r;
> + };
> +
>    use lib ("/opt/rt3/local/lib", "/opt/rt3/lib");
>    use RT;
> 
> I found the information @ 
> http://www.mail-archive.com/modperl@apache.org/msg33301.html
> 
> -Brook 





More information about the rt-users mailing list