Re: Re: ocilogon error
| From: | Christopher Jones | Date: | Thu, 01 Apr 2004 02:27:08 +0000 |
| Subject: | Re: Re: ocilogon error | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-33727@lists.php.net to get a copy of this message | ||
Justin Patrin wrote:
Adam Williams wrote: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" (http://otn.oracle.com/tech/opensource/php/php_troubleshooting_faq.html) but this doesn't sound like your scenario. ChrisHi, 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: <?php $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 NLS_LANG="AMERICAN_AMERICA.WE8ISO8859P1" 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.