[rt-users] local, _Overlay or _Local not working.

Jason Taylor jasont at ceredigion.gov.uk
Wed Apr 6 18:02:27 EDT 2005


Hi,

I'm trying to make a few local changes to my rt installation but my
redefines don't seem to be working properly.

For instance,

/usr/local/rt3/lib/RT/Interface/Web_Local.pm:

use strict;
no warnings qw(redefine);
sub WebExternalAutoInfo {
    my $user = shift;

    my %user_info;

@data = `/usr/local/bin/lookupuser.pl $EmailAddress`;
if (@data[1] ne "") {
    $user_info{'Name'} = $EmailAddress;
    $user_info{'Country'} = 'UK';
    $user_info{'WorkPhone'} = @data[4];
    $user_info{'MobilePhone'} = @data[6];
    $user_info{'Comments'} = "Info sourced from Cardinet Phone Directory";
    $user_info{'RealName'} = @data[0];
    $user_info{'Address1'} = @data[3];
    $user_info{'Gecos'} = @data[2];
  };
    return {%user_info};
};

Now I know that the _Local file is being processed as if I introduce errors
into the file then the errors get listed when I restart apache.

I know for sure that the routines are being called as I've peppered Log
output all around the original calls and in my code.  The original
code is definitely called, but my overlay is not.

I've tried all 3 methods for replacing the code and none of them seem to
make any difference.  When I edit the original Web.pm file with
my code it works fine.  

Does anyone have any ideas as to what might be causing this?

I'm running running the following versions of Perl/RT/mod_perl:

apache-1.3.33_1     The extremely popular Apache http server.  Very fast,
very
mod_perl-1.29_1     Embeds a Perl interpreter in the Apache server
perl-5.8.5          Practical Extraction and Report Language
rt-3.2.2            RT is an industrial-grade ticketing system written in
Perl

On FreeBSD 5.3. Installed from ports day before yesterday.

My RT_SiteConfig.pm looks like:

Set($DatabaseType,'Pg');
Set($WebFallbackToInternalAuth,1);
Set($WebExternalAuto , 1);
Set($WebExternalAuth , 1);
Set($DatabaseHost,'cmsdbserver');
Set($DatabaseRTHost,'cmsdbserver');
Set($rtname , "ceredigion.gov.uk");
Set($Organization , "ceredigion.gov.uk");
Set($RTAddressRegexp , '^rt\@ceredigion.gov.uk$');
Set($CanonicalizeEmailAddressMatch   , 'subdomain.ceredigion.gov.uk$');
Set($CanonicalizeEmailAddressReplace , 'ceredigion.gov.uk');
Set($CorrespondAddress , 'rt at rt.ceredigion.gov.uk');
Set($CommentAddress , 'rt-comment at rt.ceredigion.gov.uk');
1;

and my relevant Apache config is:

PerlModule Apache::DBI
#B
PerlRequire /usr/local/rt3/bin/webmux.pl
<Location />
SetHandler perl-script
PerlHandler RT::Mason
</Location>

I've had a good scan through the mailing lists and can't find anyone with
similar problems.

Thanks in advance for your help.  If you require further info please shout.

Jason.





More information about the rt-users mailing list