Help with DBIx::SearchBuilder::Handle::Oracle...

Luis Campos de Carvalho monsieur_champs at yahoo.com.br
Wed Dec 7 20:54:55 GMT 2005


--- jesse <jesse at fsck.com> escreveu:
> >   Wow. Jesse itself. :-) What a honnor.
> 
> "himself" usually ;)

  Ouch!
  Please sorry. English is not my mother-tonge, as you can see... ;-)

> I'd probably YAML::Dump(%ENV) just before 
> the connect statement. My bet
> is apache is clobbering some of your oraenv
> 

  Well, I modified lib/RT/Handle.pm, like this:

=head2 Connect

Connects to RT's database handle.
Takes nothing. Calls SUPER::Connect with the needed args

=cut

sub Connect {
    my $self = shift;

    if ($RT::DatabaseType eq 'Oracle') {
        $ENV{'NLS_LANG'} = "AMERICAN_AMERICA.AL32UTF8";
        $ENV{'NLS_NCHAR'} = "AL32UTF8";

    }

    use Data::Dumper;
    print STDERR Dumper( \%ENV );

    $self->SUPER::Connect(
                         User => $RT::DatabaseUser,
                         Password => $RT::DatabasePassword,
                        );

    $self->dbh->{LongReadLen} = $RT::MaxAttachmentSize;

}

=head2 BuildDSN

  So I can see some logs before the connection procedure starts up.

  What showed on the logs is here:

===================== httpd error log ===================
$VAR1 = {
          'NLS_LANG' => 'AMERICAN_AMERICA.AL32UTF8',
          'ORACLE_HOME' => '/opt/oracle/software/10.2.0.1',
          'NLS_NCHAR' => 'AL32UTF8',
          'SCRIPT_NAME' => '',
          'SERVER_NAME' => 'machine.local',
          'SERVER_ADMIN' => 'user at machine.local',
          'HTTP_ACCEPT_ENCODING' => 'gzip, deflate',
          'PATH_INFO' => '/',
          'HTTP_CONNECTION' => 'Keep-Alive',
          'REQUEST_METHOD' => 'GET',
          'HTTP_ACCEPT' => 'image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint,
application/msword, application/x-icq, */*',
          'SCRIPT_FILENAME' => '/usr/local/rt/share/html',
          'SERVER_SOFTWARE' => 'Apache/1.3.34 (Unix) mod_perl/1.29',
          'QUERY_STRING' => '',
          'REMOTE_PORT' => '2166',
          'HTTP_USER_AGENT' => 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR
1.1.4322)',
          'SERVER_SIGNATURE' => '<ADDRESS>Apache/1.3.34 Server at machine.local Port 80</ADDRESS>
',
          'SERVER_PORT' => '80',
          'HTTP_ACCEPT_LANGUAGE' => 'pt-br',
          'REMOTE_ADDR' => '192.168.87.175',
          'SERVER_PROTOCOL' => 'HTTP/1.1',
          'PATH' => '/bin:/usr/bin',
          'REQUEST_URI' => '/',
          'GATEWAY_INTERFACE' => 'CGI-Perl/1.1',
          'SERVER_ADDR' => '192.168.87.20',
          'DOCUMENT_ROOT' => '/usr/local/rt/share/html',
          'PATH_TRANSLATED' => '/usr/local/rt/share/html/',
          'HTTP_HOST' => 'suporte',
          'MOD_PERL' => 'mod_perl/1.29'
        };
DBI connect('DEVEL','rt',...) failed: ERROR OCIEnvNlsCreate (check ORACLE_HOME and NLS settings
etc.) at /usr/lib/perl5/site_perl/5.8.5/DBIx/SearchBuilder/Handle.pm line 108
[Wed Dec  7 18:41:58 2005] [error] Connect Failed ERROR OCIEnvNlsCreate (check ORACLE_HOME and NLS
settings etc.)\n at /usr/local/rt/lib/RT.pm line 176\n
==========================================================

  And this is really confusing.  All ORA* variables are correct, and like I've setted them. But I
still not getting a connection... any new suggestions? Am I missing something quite obvious?

  Many thanks for your help again.
  Best regards.

--
Luis Campos de Carvalho
Member of "São Paulo Perl Mongers",
Unix SysAdmin & OCP/DBA Oracle
http://br.geocities.com/monsieur_champs/


	



	
		
_______________________________________________________ 
Yahoo! doce lar. Faça do Yahoo! sua homepage. 
http://br.yahoo.com/homepageset.html 



More information about the london.pm mailing list