Justin Patrin wrote:

Adam Williams wrote:

Hi, I have oracle and PHP working together on a remote server called zed that runs redhat linux. I have another computer called accessserver that runs win2k pro with PHP that I am trying to connect to oracle on zed. Both computers have the oracle client libraries installed. On accessserver I have the code:

$conn = ocilogon("user","pw","zed.aleph0") or die .ora_error();
if ($conn)
{ echo "connection to oracle successful"; }

When I run this I get the error:

Warning: ocilogon(): OCISessionBegin: ORA-12705: invalid or unknown NLS parameter value specified in C:\htdocs\oracleconnect.php on line 2

I've tried looking on google for the NLS parameter but I'm not having much luck. Anyone able to help? Thanks!

You probably need to set up some environment vars. Here's the ones I have set:
export ORA_NLS33="/usr/lib/ora/ocommon/nls/admin/data"
export ORA_NLS="/usr/lib/ora/ocommon/nls/admin/data"
export ORACLE_HOME="/usr/lib/ora"
export ORACLE_BASE="/usr/lib"

Fix the paths, put those in your env, then restart apache and see if you still have the problems.

Yes, correctly setting the ORACLE_HOME, NLS_LANG and maybe ORA_NLS33
variables will probably resolve it.

I'm not aware of any OCI-runtime need for ORACLE_BASE.  For
completeness, ORA_NLS is used with Oracle 7.2 client libraries,
ORA_NLS32 with Oracle 7.3, and ORA_NLS33 with Oracle 8 and 9.  With
Oracle 10g the variable is ORA_NLS10.  From about Oracle 7.3 onwards
ORA_NLSxx should default correctly.  It may not be needed with a basic
Oracle installation.

On Windows I guess it's possible to have an environment variable and
registry clash.  There is a string in %ORACLE_HOME%\bin\oracle.key.
Use this string as the registry hierarchy to check.

If you have Oracle Metalink access there is a whole article discussing
the causes of ORA-12705 ("ORA-12705 - Common Reasons and How to
Resolve Them", Article #158654.1).  Causes include invalid values for
NLS_LANG, an incorrect directory specified in ORA_NLSxx, lack of read
permissions on the %ORACLE_HOME%\ocommon\nls\admin\data directory
(this is the directory that ORA_NLS33 should generally be set to), and
an invalid ORACLE_HOME specified in Oracle Net's listener.ora file.

Once specific mention of ORA-12705 is made in the newly updated "Oracle
PHP Troubleshooting FAQ" 
but this doesn't sound like your scenario.


PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to