#38503 [Opn->Fbk]: Can't load UTF-8 CLOBS

From: Date: Fri, 18 Aug 2006 20:35:14 +0000
Subject: #38503 [Opn->Fbk]: Can't load UTF-8 CLOBS
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-100955@lists.php.net to get a copy of this message
ID: 38503 Updated by: tony2001@php.net Reported By: thomas dot adams at interone dot de -Status: Open +Status: Feedback Bug Type: OCI8 related Operating System: Ubuntu 4.0.3-1 PHP Version: 5.1.5 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.2-win32-latest.zip Previous Comments: ------------------------------------------------------------------------ [2006-08-18 16:26:33] thomas dot adams at interone dot de Description: ------------ Versions of PHP newer than 5.1.2 (5.1.3/4/5) failed at loading a CLOB in a UTF-8 Oracle Database (tested with Oracle 10.2). There are neither exceptions thrown nor any other error messages are shown. The statement " echo $row[0]->load();" returns simply no output. Downgrading to version 5.1.2 resolves this, so this might be bug. Kind regards Thomas Adams Reproduce code: --------------- $sql='select ID, TEXT from TEST_CLOB'; // where Text is CLOB $stmt = oci_parse($connection, $sql); oci_execute($stmt) or die ("Unable to execute query\n"); $i=0; while ( $row = oci_fetch_array($stmt,OCI_NUM) ) { echo ($i+1) . " ". $row[0] ." : "; print $row[1]->load(); print " ... this is " . (is_object($row[1])?" an object ":" not an object "); print " ... object is " . (is_a($row[1],'OCI-Lob')?"a OCI-Lob ":"not a OCI-Lob "); print " ... class name of object is " . get_class($row[1]); print " ... vardump is "; var_dump($row); print '<br />'; $i++; } Expected result: ---------------- The "print $row[1]->load();" line should return the actual values from the select statement. Actual result: -------------- row[1]->load() returns nothing. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=38503&edit=1

« previous php.bugs (#100955) next »