|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-01-12 10:47 UTC] tony2001@php.net
[2006-01-12 12:24 UTC] webmaster at f1-timer dot de
[2006-01-12 23:03 UTC] sniper@php.net
[2006-08-09 12:45 UTC] tony2001@php.net
[2006-08-09 15:27 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 04:00:02 2025 UTC |
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.