From:             Marek dot Martofel at oracle dot com
Operating system: Linux
PHP version:      4.3.4
PHP Bug Type:     OCI8 related
Bug description:  ORA-00604 and ORA-01756 when ocilogon with 
NLS_LANG=Polish_Poland.EE8ISO8859P2

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 bug report at http://bugs.php.net/?id=27088&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=27088&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=27088&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=27088&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=27088&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=27088&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=27088&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=27088&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=27088&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=27088&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=27088&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=27088&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=27088&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27088&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=27088&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=27088&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=27088&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=27088&r=float

Reply via email to