[rt-users] OCIEnvNlsCreate (check ORACLE_HOME and NLS settings) with mod_perl 1.29
Matt Scifo
mscifo at gmail.com
Wed Jul 13 11:23:36 EDT 2005
JoopvandeWege at mococo.nl wrote:
>
> On Tue, 12 Jul 2005 14:27:21 -0400 (EDT)
> rt-users-request at lists.bestpractical.com
> <mailto:rt-users-request at lists.bestpractical.com> wrote:
>
> > I'm getting the OCIEnvNlsCreate (check ORACLE_HOME and NLS settings)
> > error when trying to browse to my RT installation. I've been
> > researching this problem for quite awhile now and none of the standard
> > solutions have worked for me.
> >
> > Here's my environment....
> >
> > RT 3.4.2 (new install)
> > Apache/1.3.33 (Debian GNU/Linux) mod_perl/1.29
> > Oracle 10g remote server using Oracle Instant Client
> > DBD::Oracle 1.16
> > make testdeps shows all found
> >
> > httpd.conf...
> >
> > PerlSetEnv "TWO_TASK" "app1"
> > PerlSetEnv "ORACLE_HOME" "/opt/oracle/instantclient10_1"
> > PerlSetEnv "LD_LIBRARY_PATH" "/opt/oracle/instantclient10_1/lib"
> > PerlSetEnv "NLS_LANG" "AMERICAN_AMERICA.UTF8"
> >
> > <Perl>
> > print "$_ = $ENV{$_} " for sort keys %ENV;
> > use DBI;
> > DBI->connect('dbi:Oracle:app1','rt','X') || print "Connect Failed
> > $DBI::errstr ";
> > </Perl>
> >
> > PerlModule Apache::DBI
> > PerlRequire /opt/rt3/bin/webmux.pl
> >
> > <Location />
> > SetHandler perl-script
> > PerlHandler RT::Mason
> > </Location>
> >
> > I added the <Perl> code at the beginning just to see if it was any
> > issue with RT or not. When I run the code enclosed in <Perl> tags
> > from the command line it connects successfully. However, when I
> > startup apache and try to run the same code I get "DBI
> > connect('app1','rt',...) failed: ERROR OCIEnvNlsCreate (check
> > ORACLE_HOME and NLS settings etc.)". Both runs show the proper ENV
> > variables set before DBI loads up the Oracle library. This isn't
> > mod_perl2 so it's not related to the C %ENV problem found in the
> > troubleshooting faq.
> >
> > Can anyone help?
> I have had a similar if not the same problem, I'm on Oracle9i R2, and
> solved it by either setting ENV stuff in my .profile of my webuser
> and/or setting it in RT.lib.
> The reason is that before RT loads it configuration settings it clears
> out its ENV, including whatever you have set in httpd.conf or in your
> shell.
> I remember this because recently I started using AT and modified a
> dataloader script to work with active-state perl on windows so I can
> scan computers on our networks and import them directly into RT-AT.
> This script started complaining about wrong NLS settings which I blamed
> originally on my windows machine but it turned out I had added NLS
> parameters in RT.lib (very bad I know)
>
> Maybe this helps,
>
Sorry Joop, but that does not help. I already have the ENV vars setup
in the apache user's profile and have already messed around with setting
them in webmux.pl and lib/RT.pm. That is why I added the Perl code to
run before apache loads up anything to do with RT....to show that it's a
problem with DBI and modperl, not actually RT. I was just hoping
someone else came across this and knew of a solution.
Matt
More information about the rt-users
mailing list