|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-01-29 16:54 UTC] sniper@php.net
[2004-02-03 08:09 UTC] sniper@php.net
[2004-11-30 10:44 UTC] robert dot ranftler at bau-data dot co dot at
[2005-06-27 23:06 UTC] wez@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 13:00:01 2025 UTC |
Description: ------------ When you trye to use ocilogon() in any php code from Apache you can see: Warning: ocilogon(): OCISessionBegin: ORA-00604: error occurred at recursive SQL level 1 ORA-01756: quoted string not properly terminated in /usr/local/apache/htdocs/ocitest.php on line 2 where /usr/local/apache/htdocs/ocitest.php is some like: <?php $db_conn = ocilogon("scott","tiger", "RH9204"); $cmdstr = "select ename, sal from emp"; $parsed = ociparse($db_conn, $cmdstr); ociexecute($parsed); .... that happen only if you have NLS_LANG set to other then AMERICAN_AMERICA. Solution is to use: NLS_LANG=American_America.EE8ISO8859P2 or unset this environment variable. Reproduce code: --------------- Use following script to start Apache: #!/bin/bash export ORACLE_HOME=/u01/ora920/app/oracle/product/920 export ORACLE_SID=RH9204 export ORA_NLS33=/u01/ora920/app/oracle/product/920/ocommon/nls/admin/data export LD_LIBRARY_PATH=/u01/ora920/app/oracle/product/920/lib export NLS_LANG=Polish_Poland.EE8ISO8859P2 export APACHE_HOME=/usr/local/apache echo "Oracle Home: $ORACLE_HOME" echo "Oracle SID: $ORACLE_SID" echo Starting Apache $APACHE_HOME/bin/apachectl start now you can see the ORA-00604 error. Commenting out or seting NLS_LANG to American_America you can resolve this isue.