php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #27088 ORA-00604 and ORA-01756 when ocilogon with NLS_LANG=Polish_Poland.EE8ISO8859P2
Submitted: 2004-01-29 11:53 UTC Modified: 2005-06-27 23:06 UTC
Votes:4
Avg. Score:3.8 ± 1.3
Reproduced:3 of 3 (100.0%)
Same Version:1 (33.3%)
Same OS:2 (66.7%)
From: Marek dot Martofel at oracle dot com Assigned:
Status: Not a bug Package: OCI8 related
PHP Version: 4.3.4 OS: Linux
Private report: No CVE-ID: None
 [2004-01-29 11:53 UTC] 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.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-02-03 08:09 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 [2004-11-30 10:44 UTC] robert dot ranftler at bau-data dot co dot at
I have the same problem with Version 4.3.9 and Oracle 9.2 on RedHat Enterprise Serve 3. Has Anybody any Idea for a solution????
 [2005-06-27 23:06 UTC] wez@php.net
Bug #31476 is related and has some additional advice.
Neither are PHP bugs, so marking this as bogus.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 18 14:01:35 2024 UTC