ID:               27088
 Updated by:       [EMAIL PROTECTED]
 Reported By:      Marek dot Martofel at oracle dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         OCI8 related
 Operating System: Linux
 PHP Version:      4.3.4
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip




Previous Comments:
------------------------------------------------------------------------

[2004-01-29 11:53:41] Marek dot Martofel at oracle dot com

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.



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=27088&edit=1

Reply via email to