Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> ORA-12705 with PHP and Oracle 8.0.4
I use the PHP3 code below to connect from Apache 1.3.6 with PHP 3.0.11 to Oracle 8.0.4 running on Digital UNIX 4.0b. When I set NLS_LANG variable to either CZECH_CZECHOSLOVAKIA.EE8ISO8859P2 (which is our local environment) or to AMERICAN_AMERICA.EE8ISO8859P2 (which is default environment which we sometimes use when there are NLS-related problems), ora_logon() always fails with the following error message:
ORA-12705: invalid or unknown NLS parameter value specified
When I unset NLS_LANG variable, ora_logon() usually works, but sometimes (about every fifth connection attempt) it unpredictably fails with the same error message.
When I set the same parameters as UNIX environment variables and use sqlplus to connect to Oracle, it always works without problems. I tried seting/unseting various combinations of NLS parameters, using different versions of PHP and Apache, and I applied the latest patches to OS, but the problem still persists.
Does anybody have any idea on where can be the problem?
Sven Ubik E-mail: ubik_at_fsid.cvut.cz Czech Technical University, Prague, Czech Republic
PHP3 code excerpt:
$oracle_home="/fs2/app/oracle/product/8.0.4";
$oracle_sid="testoo1";
$ora_nls=$oracle_home . "/ocommon/nls/admin/data";
$nls_lang="CZECH_CZECHOSLOVAKIA.EE8ISO8859P2";
$nls_sort="XCZECH";
$language="CZECH";
putenv("ORACLE_HOME=$oracle_home"); putenv("ORACLE_SID=$oracle_sid"); putenv("ORA_NLS=$ora_nls"); putenv("ORA_NLS32=$ora_nls"); putenv("ORA_NLS33=$ora_nls"); putenv("NLS_LANG=$nls_lang"); putenv("NLS_SORT=$nls_sort"); putenv("LANGUAGE=$language");Received on Wed Aug 11 1999 - 09:30:34 CDT
$conn=ora_logon("", "");
. . .