ID: 37406 Updated by: [EMAIL PROTECTED] Reported By: spatar at mail dot nnov dot ru -Status: Open +Status: Feedback Bug Type: OCI8 related Operating System: SuSE PHP Version: 5.1.4 New Comment:
I intentionally wrote "next snapshot" because the latest snapshot was built BEFORE the patch has been applied. Previous Comments: ------------------------------------------------------------------------ [2006-05-15 10:17:42] spatar at mail dot nnov dot ru The latest CVS snapshot (php5.2-200605150830) produces the same wrong result: ---------------- size(): 26 load(): abcdef ------------------------------------------------------------------------ [2006-05-15 09:07:45] [EMAIL PROTECTED] 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 Please try next snapshot. ------------------------------------------------------------------------ [2006-05-12 13:55:26] matuszynski at element5 dot de I encountered a similar problem that might be related to this one: Reading CLOBs always leads to empty strings. When running the given sample, I get the following output: size(): 26 load(): We're using Oracle 10 client and PHP 5.1.4 under Ubuntu and connect to a Oracle 9i DB running under Solaris on SPARC ------------------------------------------------------------------------ [2006-05-11 11:09:50] spatar at mail dot nnov dot ru In older snapshot php5.1-200604030830 it worked: ---------------- size(): 26 load(): abcdefghijklmnopqrstuvwxyz ------------------------------------------------------------------------ [2006-05-11 10:57:29] spatar at mail dot nnov dot ru Description: ------------ Can't load lob string. It seems, OCI8 calculates wrong size in _bytes_ for UTF strings to load. My Oracle database charset is AL32UTF8, so maybe it's the cause of that the load() method returns only the first 1/4 part of a string. The older versions didn't have this bug. Reproduce code: --------------- <?php $conn = oci_connect("scott", "tiger", "ora10201"); $sql = "begin :p_clob := 'abcdefghijklmnopqrstuvwxyz'; end;"; $stid = oci_parse($conn, $sql); $clob = oci_new_descriptor($conn, OCI_D_LOB); oci_bind_by_name($stid, ":p_clob", $clob, -1, OCI_B_CLOB); $r = oci_execute($stid, OCI_DEFAULT); if ($r) { echo "size(): ", $clob->size(), "\n"; echo "load(): ", $clob->load(), "\n"; } $clob->free(); oci_free_statement($stid); oci_close($conn); ?> Expected result: ---------------- size(): 26 load(): abcdefghijklmnopqrstuvwxyz Actual result: -------------- size(): 26 load(): abcdef ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=37406&edit=1