From: webmaster at f1-timer dot de
Operating system: Linux, Solaris
PHP version: 5.1.1
PHP Bug Type: OCI8 related
Bug description: Error ORA-24806 occur when trying to fetch a NCLOB field
Description:
------------
Trying to fetch data from an Oracle 9i Database, the Table has a NCLOB
field which cannot be read via PHP, a normal CLOB field however works. The
table structure is:
CREATE TABLE NCLOB_TEST
(
MYCLOB NCLOB
);
And it simply contains one line of text with content '12345'
I've tested this behavour with PHP 5.1.1 (Linux and Solaris) and 4.1.1
(only Linux), always give the same result.
Reproduce code:
---------------
<?php
$query = 'SELECT MYCLOB FROM NCLOB_TEST';
//oci_internal_debug(1);
$sock = OCILogon('SCOTT','TIGER');
$stmt = OCIParse($sock,$query);
OCIExecute($stmt,OCI_DEFAULT);
OCIFetchInto($stmt,$resultarray,OCI_ASSOC+OCI_RETURN_NULLS+OCI_RETURN_LOBS);
print_r($resultarray);
// Now try to load the clob with descriptor:
OCIExecute($stmt,OCI_DEFAULT);
OCIFetchInto($stmt,$resultarray,OCI_ASSOC);
print_r($resultarray);
$lobcontent = $resultarray['MYCLOB']->load();
OCIFreeStatement($stmt);
print_r($lobcontent);
OCILogoff($sock);
exit;
?>
Expected result:
----------------
Array
(
[MYCLOB] => '12345'
)
Array
(
[MYCLOB] => '12345'
)
Actual result:
--------------
PHP Warning: ocifetchinto(): OCILobRead: ORA-24806:
LOB-Formfehlanpassung
in /spare/html/private/PHP-Classes/OCI8/bugzilla_php.php on line 8
Warning: ocifetchinto(): OCILobRead: ORA-24806: LOB-Formfehlanpassung
in /spare/html/private/PHP-Classes/OCI8/bugzilla_php.php on line 8
Array
(
[MYCLOB] =>
)
Array
(
[MYCLOB] => OCI-Lob Object
(
[descriptor] => Resource id #8
)
)
PHP Warning: OCI-Lob::load(): OCILobRead: ORA-24806:
LOB-Formfehlanpassung
in /spare/html/private/PHP-Classes/OCI8/bugzilla_php.php on line 16
Warning: OCI-Lob::load(): OCILobRead: ORA-24806: LOB-Formfehlanpassung
in /spare/html/private/PHP-Classes/OCI8/bugzilla_php.php on line 16
PS: The Error is in english "LOB form mismatch" and is described from
Oracle as below:
netra:/opt/apache2/conf# oerr ora 24806
24806, 00000, "LOB form mismatch"
// *Cause: When reading from or writing into LOBs, the character set
// form of the user buffer should be same as that of the LOB.
// *Action: Make sure that the buffer you are using to read or write
// has the same form as that of the LOB.
--
Edit bug report at http://bugs.php.net/?id=35973&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=35973&r=trysnapshot44
Try a CVS snapshot (PHP 5.1):
http://bugs.php.net/fix.php?id=35973&r=trysnapshot51
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=35973&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=35973&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=35973&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=35973&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=35973&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=35973&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=35973&r=support
Expected behavior: http://bugs.php.net/fix.php?id=35973&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=35973&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=35973&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=35973&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35973&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=35973&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=35973&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=35973&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=35973&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=35973&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=35973&r=mysqlcfg