[Rt-devel] Multi-instance patch

Bob Goldstein bobg at uic.edu
Mon Dec 19 22:41:16 EST 2005


>> 
>> Your problem may be that RT_INSTANCE_PATH needs to point to a full
>> instance.  So, for me, when I set RT_INSTANCE_PATH=/var/rt3_purchasing the
>> config that gets used is /var/rt3_purchasing/etc/RT_SiteConfig.pm.  Notice
>> that RT fills in the "/etc/" part of the path automatically.
>>  $ ls /var/rt3_purchasing/
>>  etc  lib  local  var
>>  $ ls /var/rt3_purchasing/etc
>>  RT_Config.pm  RT_SiteConfig.pm
>
>OK so I have instead (outside of the virtualhost tags):
>FastCgiServer 
>/home/testguy/usr/share/request-tracker3.4/libexec/mason_handler.fcgi 
>-initial-env RT_INSTANCE_PATH=/home/testguy
>
>I am using /home/USERNAME for all of my separate instances. Using this, 
>I get a 500 internal server error from the webpage, and the following in 
>the apache error log:
>
>Can't locate /etc/request-tracker3.4/RT_SiteConfig.pm in @INC (@INC 
>contains: /usr/local/share/request-tracker3.4/lib 
>/usr/share/request-tracker3.4/lib /etc/perl /usr/local/lib/perl/5.8.4 
>/usr/local/share/perl/5.8.4 /usr/lib/perl5 /usr/share/perl5 
>/usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .) at 
>/usr/share/request-tracker3.4/lib/RT.pm line 176.
>BEGIN failed--compilation aborted at 
>/usr/share/request-tracker3.4/libexec/webmux.pl line 85.
>Compilation failed in require at 
>/home/testguy/usr/share/request-tracker3.4/libexec/mason_handler.fcgi 


That seems a little odd to me.  Just checking, but take a look
at RT.pm.  Near the top, you should see something like this:

$SITE_CONFIG_FILE = "/usr/share/request-tracker3.4/etc/request-tracker3.4/RT_SiteConfig.pm";

$BasePath = '/usr/share/request-tracker3.4';

Later on, this code from the patch:

    if ($RT_INSTANCE_PATH) {
        foreach my $vref (@variables) {
            $$vref =~ s/^\Q$BasePath\E/$RT_INSTANCE_PATH/;
        }
    }

should turn $SITE_CONFIG_FILE into /home/testguy/etc/request-tracker3.4/RT_SiteConfig.pm

(I'm guessing at your directory structure, so this may not be exactly right for you.)

Yet your error message doesn't say anything about this file, it leaves
off the /home/testguy part.


If I were debugging this, I'd add some logging or print statements
to verify the changes in all the variables in the above loop,
and to verify that $RT_INSTANCE_PATH is set correctly,
since it seems to me, you are already in trouble by the time
you leave the RT::import() routine.

   bobg


More information about the Rt-devel mailing list