From: spatar at mail dot nnov dot ru
Operating system: SuSE
PHP version: 5.1.4
PHP Bug Type: OCI8 related
Bug description: Can't load lob string
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 bug report at http://bugs.php.net/?id=37406&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=37406&r=trysnapshot44
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=37406&r=trysnapshot52
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=37406&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=37406&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=37406&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=37406&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=37406&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=37406&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=37406&r=support
Expected behavior: http://bugs.php.net/fix.php?id=37406&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=37406&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=37406&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=37406&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=37406&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=37406&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=37406&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=37406&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=37406&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=37406&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=37406&r=mysqlcfg