Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Oracle NLS_LANG and Apache

451 views
Skip to first unread message

Dorothea Kuehn

unread,
Nov 23, 2000, 3:00:00 AM11/23/00
to
Hi,
I have some trouble with a connection to Oracle from CGI scripts. The
scripts need the NLS_LANG variable set (especially the charset). Ok, I
do
SetEnv NLS_LANG AMERICAN_AMERICA.WE8ISO8859P1
in the Apache httpd.conf - the variable is set if I look it up with the
printenv script that comes with apache - but this always results in
OracleError: (12705, 'Error while trying to retrieve text for error
ORA-12705')
when a script tries to connect to the DB. If I don't set NS_LANG, all
string insertions with german umlauts are messed up.

If NLS_LANG is set as an environment variable and I run the scripts from
the commandline, everything works.

System: Solaris 2.8, apache 1.3.14, the cgi scripts are in python and use
DCOracle (a python module using OCI) to connect to the DB.

thanks for any help,
dekay

justvrk

unread,
Nov 24, 2000, 3:00:00 AM11/24/00
to
Hi,
Here is the oerr for 12705 from the manuals.
==>
ORA-12705: invalid or unknown NLS parameter value specified
Cause: There are two possible causes: Either an attempt was made to issue an
ALTER SESSION statement with an invalid NLS parameter or value; or the
NLS_LANG environment variable contains an invalid language, territory, or
character set.

Action: Check the syntax of the ALTER SESSION command and the NLS parameter,
correct the syntax and retry the statement, or specify correct values in the
NLS_LANG environment variable. For more information about the syntax of the
ALTER SESSION command, see the index entry on "ALTER SESSION command" in
Oracle8 Server SQL Reference.

<==

it appears you have set the incorrect NLS_LANG parameter. Correct it to the
one the database is configured with.

HTH,
vrkulkarni

"Dorothea Kuehn" <de...@zedat.fu-berlin.de> wrote in message
news:8vjsvo$4tifk$1...@fu-berlin.de...

Dorothea Kuehn

unread,
Nov 24, 2000, 3:00:00 AM11/24/00
to
In <8vm1d6$oud$1...@new-proxy.bscc.bls.com> schrieb
justvrk <jus...@my-deja.com>:
[...]

> it appears you have set the incorrect NLS_LANG parameter. Correct it to the
> one the database is configured with.

No, that is the NLS_LANG parameter the database is configured with.
Anyway, I solved the problem setting the NLS_LANG environment variable in
the CGI script that connects to the database.

The error results probably from some strange communication problems
between Apache and Oracle ... whatever.

regards,
dekay

0 new messages