NLS issues if using DBD::Oracle from mod_perl2

From: Juan Jose Natera (naterajj_at_gmail.com)
Date: 02/07/05


Date: Mon, 7 Feb 2005 10:44:56 -0800
To: DBI Users <dbi-users@perl.org>

Hello,

I am getting this error while trying to connect to an Oracle server
from a custom perl module:

DBI connect('','x',...) failed: ERROR OCIEnvNlsCreate (check
ORACLE_HOME and NLS settings etc.)

I get this error _only_ if I use my module from mod_perl2, otherwise
it works fine (a command line script that uses the same module for
example).

By googling I found that this has to do with the NLS environment
variable, which was not set, though LANG is "en_US.UTF-8".

I added a line like this to my httpd.conf

PerlSetEnv "NLS_LANG" "AMERICAN_AMERICA.UTF8"

But it didn't work. I get the same connection error.

Any pointer?

Thanks in Advance.

Juan Natera