Ask a Question related to PHP Bugs, Design and Development.
-
jarismar_silva at adplabs dot com #1
#39199 [NEW]: Cannot load Lob data with more than 4000 bytes on ORACLE 10
From: jarismar_silva at adplabs dot com
Operating system: Linux
PHP version: 5.2.0RC5
PHP Bug Type: PDO related
Bug description: Cannot load Lob data with more than 4000 bytes on ORACLE 10
Description:
------------
Trying to read a CLOB field with has more than 4000 bytes result on empty
stream.
Reproduce code:
---------------
<?php
/* Table structure
CREATE TABLE test_clob (
id NUMBER(10),
data CLOB
)
*/
$sDSN = 'oci:dbname=//<server>:1521/<database>;charset=UTF-8';
$sUserName = '<user>';
$sPassword = '<passwd';
try {
$oPDO = new PDO($sDSN, $sUserName, $sPassword, $aDriverOptions);
$oStmt = $oPDO->prepare("insert into test_clob (id, data) values (:id,
EMPTY_CLOB())");
$iID = 1;
$oStmt->bindParam(':id', $iID);
if ($oStmt->execute()) {
$oStmt = $oPDO->prepare("update test_clob set data=:value where
id=1");
$sData = '<4000 bytes or more>';
$oStmt->bindParam(':value', $sData);
if ($oStmt->execute() === false) {
throw new Exception('Error on update clob');
}
} else {
throw new Exception('Error on insert EMPTY_CLOB');
}
$oStmt = $oPDO->prepare("select data from test_clob where id = :id");
$oStmt->bindParam('id', $iID);
$oStmt->execute();
$oResult = $oStmt->fetch();
echo 'Read '.strlen(stream_get_contents($oResult['DATA'])).' characters
<br>';
} catch (Exception $oE) {
echo '<pre>';print_r($oStmt->errorInfo());echo "</pre><br>\n";
echo $oException->getMessage()."<br>\n";
}
$oPDO = null;
Expected result:
----------------
Read N characters (N >0)
Actual result:
--------------
Read 0 characters
--
Edit bug report at [url]http://bugs.php.net/?id=39199&edit=1[/url]
--
Try a CVS snapshot (PHP 4.4): [url]http://bugs.php.net/fix.php?id=39199&r=trysnapshot44[/url]
Try a CVS snapshot (PHP 5.2): [url]http://bugs.php.net/fix.php?id=39199&r=trysnapshot52[/url]
Try a CVS snapshot (PHP 6.0): [url]http://bugs.php.net/fix.php?id=39199&r=trysnapshot60[/url]
Fixed in CVS: [url]http://bugs.php.net/fix.php?id=39199&r=fixedcvs[/url]
Fixed in release: [url]http://bugs.php.net/fix.php?id=39199&r=alreadyfixed[/url]
Need backtrace: [url]http://bugs.php.net/fix.php?id=39199&r=needtrace[/url]
Need Reproduce Script: [url]http://bugs.php.net/fix.php?id=39199&r=needscript[/url]
Try newer version: [url]http://bugs.php.net/fix.php?id=39199&r=oldversion[/url]
Not developer issue: [url]http://bugs.php.net/fix.php?id=39199&r=support[/url]
Expected behavior: [url]http://bugs.php.net/fix.php?id=39199&r=notwrong[/url]
Not enough info: [url]http://bugs.php.net/fix.php?id=39199&r=notenoughinfo[/url]
Submitted twice: [url]http://bugs.php.net/fix.php?id=39199&r=submittedtwice[/url]
register_globals: [url]http://bugs.php.net/fix.php?id=39199&r=globals[/url]
PHP 3 support discontinued: [url]http://bugs.php.net/fix.php?id=39199&r=php3[/url]
Daylight Savings: [url]http://bugs.php.net/fix.php?id=39199&r=dst[/url]
IIS Stability: [url]http://bugs.php.net/fix.php?id=39199&r=isapi[/url]
Install GNU Sed: [url]http://bugs.php.net/fix.php?id=39199&r=gnused[/url]
Floating point limitations: [url]http://bugs.php.net/fix.php?id=39199&r=float[/url]
No Zend Extensions: [url]http://bugs.php.net/fix.php?id=39199&r=nozend[/url]
MySQL Configuration Error: [url]http://bugs.php.net/fix.php?id=39199&r=mysqlcfg[/url]
jarismar_silva at adplabs dot com Guest
-
#39199 [Asn]: Cannot load Lob data with more than 4000 bytes on ORACLE 10
ID: 39199 User updated by: jarismar_silva at adplabs dot com dot br -Reported By: jarismar_silva at adplabs dot com +Reported... -
#39199 [Opn->Asn]: Cannot load Lob data with more than 4000 bytes on ORACLE 10
ID: 39199 Updated by: tony2001@php.net Reported By: jarismar_silva at adplabs dot com -Status: Open +Status: ... -
Load xml data in sepearate mxml file and Populate data
I am working on a dynamic Tilelist control that will populate a data and show image under each tile from another mxml file which itself contain de... -
2003 Server - load balancing ODBC and Oracle client issues
Hi all, I have 4 servers running Windows 2003 Server Standard and IIS 6. We are using them as web servers. They are all load balanced together.... -
Apache Oracle load module problem
Hi I have finally successfully installed the DBD and DBI modules. They work fine from a script started from the command line but as soon as I... -
jarismar_silva at adplabs dot com dot rb #2
#39199 [Com]: Cannot load Lob data with more than 4000 bytes on ORACLE 10
ID: 39199
Comment by: jarismar_silva at adplabs dot com dot rb
Reported By: jarismar_silva at adplabs dot com dot br
Status: Assigned
Bug Type: PDO related
Operating System: Linux
PHP Version: 5.2.0RC5
Assigned To: wez
New Comment:
I got this bug when working with Oracle instant client 10.2.0.1.
Upgrading to 10.2.0.2 solved the problem.
Previous Comments:
------------------------------------------------------------------------
[2006-10-19 14:59:33] jarismar_silva at adplabs dot com dot br
jarismar_silva at adplabs.com.br
------------------------------------------------------------------------
[2006-10-19 14:50:44] jarismar_silva at adplabs dot com dot br
Description:
------------
Trying to read a CLOB field with has more than 4000 bytes result on
empty stream.
Reproduce code:
---------------
<?php
/* Table structure
CREATE TABLE test_clob (
id NUMBER(10),
data CLOB
)
*/
$sDSN = 'oci:dbname=//<server>:1521/<database>;charset=UTF-8';
$sUserName = '<user>';
$sPassword = '<passwd';
try {
$oPDO = new PDO($sDSN, $sUserName, $sPassword, $aDriverOptions);
$oStmt = $oPDO->prepare("insert into test_clob (id, data) values
(:id, EMPTY_CLOB())");
$iID = 1;
$oStmt->bindParam(':id', $iID);
if ($oStmt->execute()) {
$oStmt = $oPDO->prepare("update test_clob set data=:value where
id=1");
$sData = '<4000 bytes or more>';
$oStmt->bindParam(':value', $sData);
if ($oStmt->execute() === false) {
throw new Exception('Error on update clob');
}
} else {
throw new Exception('Error on insert EMPTY_CLOB');
}
$oStmt = $oPDO->prepare("select data from test_clob where id =
:id");
$oStmt->bindParam('id', $iID);
$oStmt->execute();
$oResult = $oStmt->fetch();
echo 'Read '.strlen(stream_get_contents($oResult['DATA'])).'
characters <br>';
} catch (Exception $oE) {
echo '<pre>';print_r($oStmt->errorInfo());echo "</pre><br>\n";
echo $oException->getMessage()."<br>\n";
}
$oPDO = null;
Expected result:
----------------
Read N characters (N >0)
Actual result:
--------------
Read 0 characters
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=39199&edit=1[/url]
jarismar_silva at adplabs dot com dot rb Guest
-
jarismar_silva at adplabs dot com dot br #3
#39199 [Asn->Csd]: Cannot load Lob data with more than 4000 bytes on ORACLE 10
ID: 39199
User updated by: jarismar_silva at adplabs dot com dot br
Reported By: jarismar_silva at adplabs dot com dot br
-Status: Assigned
+Status: Closed
Bug Type: PDO related
Operating System: Linux
PHP Version: 5.2.0RC5
Assigned To: wez
New Comment:
I'm closing this bug, as updating to new Oracle instant client seems to
solve the problem.
Previous Comments:
------------------------------------------------------------------------
[2006-10-23 12:10:12] jarismar_silva at adplabs dot com dot rb
I got this bug when working with Oracle instant client 10.2.0.1.
Upgrading to 10.2.0.2 solved the problem.
------------------------------------------------------------------------
[2006-10-19 14:59:33] jarismar_silva at adplabs dot com dot br
jarismar_silva at adplabs.com.br
------------------------------------------------------------------------
[2006-10-19 14:50:44] jarismar_silva at adplabs dot com dot br
Description:
------------
Trying to read a CLOB field with has more than 4000 bytes result on
empty stream.
Reproduce code:
---------------
<?php
/* Table structure
CREATE TABLE test_clob (
id NUMBER(10),
data CLOB
)
*/
$sDSN = 'oci:dbname=//<server>:1521/<database>;charset=UTF-8';
$sUserName = '<user>';
$sPassword = '<passwd';
try {
$oPDO = new PDO($sDSN, $sUserName, $sPassword, $aDriverOptions);
$oStmt = $oPDO->prepare("insert into test_clob (id, data) values
(:id, EMPTY_CLOB())");
$iID = 1;
$oStmt->bindParam(':id', $iID);
if ($oStmt->execute()) {
$oStmt = $oPDO->prepare("update test_clob set data=:value where
id=1");
$sData = '<4000 bytes or more>';
$oStmt->bindParam(':value', $sData);
if ($oStmt->execute() === false) {
throw new Exception('Error on update clob');
}
} else {
throw new Exception('Error on insert EMPTY_CLOB');
}
$oStmt = $oPDO->prepare("select data from test_clob where id =
:id");
$oStmt->bindParam('id', $iID);
$oStmt->execute();
$oResult = $oStmt->fetch();
echo 'Read '.strlen(stream_get_contents($oResult['DATA'])).'
characters <br>';
} catch (Exception $oE) {
echo '<pre>';print_r($oStmt->errorInfo());echo "</pre><br>\n";
echo $oException->getMessage()."<br>\n";
}
$oPDO = null;
Expected result:
----------------
Read N characters (N >0)
Actual result:
--------------
Read 0 characters
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=39199&edit=1[/url]
jarismar_silva at adplabs dot com dot br Guest
-
jarismar_silva at adplabs dot com dot br #4
#39199 [Csd->Opn]: Cannot load Lob data with more than 4000 bytes on ORACLE 10
ID: 39199
User updated by: jarismar_silva at adplabs dot com dot br
Reported By: jarismar_silva at adplabs dot com dot br
-Status: Closed
+Status: Open
Bug Type: PDO related
-Operating System: Linux
+Operating System: SuSE, WinXP
-PHP Version: 5.2.0RC5
+PHP Version: 5.2.0
Assigned To: wez
New Comment:
I'm reopening this bug. I have found that this bug still occurs with
Oracle Client 10.2 and SuSE Enterprise Server v.9 Patch Lvl 3 / WinXP.
Previous Comments:
------------------------------------------------------------------------
[2006-10-23 12:17:04] jarismar_silva at adplabs dot com dot br
I'm closing this bug, as updating to new Oracle instant client seems to
solve the problem.
------------------------------------------------------------------------
[2006-10-23 12:10:12] jarismar_silva at adplabs dot com dot rb
I got this bug when working with Oracle instant client 10.2.0.1.
Upgrading to 10.2.0.2 solved the problem.
------------------------------------------------------------------------
[2006-10-19 14:59:33] jarismar_silva at adplabs dot com dot br
jarismar_silva at adplabs.com.br
------------------------------------------------------------------------
[2006-10-19 14:50:44] jarismar_silva at adplabs dot com dot br
Description:
------------
Trying to read a CLOB field with has more than 4000 bytes result on
empty stream.
Reproduce code:
---------------
<?php
/* Table structure
CREATE TABLE test_clob (
id NUMBER(10),
data CLOB
)
*/
$sDSN = 'oci:dbname=//<server>:1521/<database>;charset=UTF-8';
$sUserName = '<user>';
$sPassword = '<passwd';
try {
$oPDO = new PDO($sDSN, $sUserName, $sPassword, $aDriverOptions);
$oStmt = $oPDO->prepare("insert into test_clob (id, data) values
(:id, EMPTY_CLOB())");
$iID = 1;
$oStmt->bindParam(':id', $iID);
if ($oStmt->execute()) {
$oStmt = $oPDO->prepare("update test_clob set data=:value where
id=1");
$sData = '<4000 bytes or more>';
$oStmt->bindParam(':value', $sData);
if ($oStmt->execute() === false) {
throw new Exception('Error on update clob');
}
} else {
throw new Exception('Error on insert EMPTY_CLOB');
}
$oStmt = $oPDO->prepare("select data from test_clob where id =
:id");
$oStmt->bindParam('id', $iID);
$oStmt->execute();
$oResult = $oStmt->fetch();
echo 'Read '.strlen(stream_get_contents($oResult['DATA'])).'
characters <br>';
} catch (Exception $oE) {
echo '<pre>';print_r($oStmt->errorInfo());echo "</pre><br>\n";
echo $oException->getMessage()."<br>\n";
}
$oPDO = null;
Expected result:
----------------
Read N characters (N >0)
Actual result:
--------------
Read 0 characters
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=39199&edit=1[/url]
jarismar_silva at adplabs dot com dot br Guest
-
diegotremper at gmail dot com #5
#39199 [Com]: Cannot load Lob data with more than 4000 bytes on ORACLE 10
ID: 39199
Comment by: diegotremper at gmail dot com
Reported By: jarismar_silva at adplabs dot com dot br
Status: Open
Bug Type: PDO related
Operating System: SuSE, WinXP
PHP Version: 5.2.0
Assigned To: wez
New Comment:
I obtained in the same error on Windows XP SP2
Previous Comments:
------------------------------------------------------------------------
[2006-11-07 17:05:46] jarismar_silva at adplabs dot com dot br
I'm reopening this bug. I have found that this bug still occurs with
Oracle Client 10.2 and SuSE Enterprise Server v.9 Patch Lvl 3 / WinXP.
------------------------------------------------------------------------
[2006-10-23 12:17:04] jarismar_silva at adplabs dot com dot br
I'm closing this bug, as updating to new Oracle instant client seems to
solve the problem.
------------------------------------------------------------------------
[2006-10-23 12:10:12] jarismar_silva at adplabs dot com dot rb
I got this bug when working with Oracle instant client 10.2.0.1.
Upgrading to 10.2.0.2 solved the problem.
------------------------------------------------------------------------
[2006-10-19 14:59:33] jarismar_silva at adplabs dot com dot br
jarismar_silva at adplabs.com.br
------------------------------------------------------------------------
[2006-10-19 14:50:44] jarismar_silva at adplabs dot com dot br
Description:
------------
Trying to read a CLOB field with has more than 4000 bytes result on
empty stream.
Reproduce code:
---------------
<?php
/* Table structure
CREATE TABLE test_clob (
id NUMBER(10),
data CLOB
)
*/
$sDSN = 'oci:dbname=//<server>:1521/<database>;charset=UTF-8';
$sUserName = '<user>';
$sPassword = '<passwd';
try {
$oPDO = new PDO($sDSN, $sUserName, $sPassword, $aDriverOptions);
$oStmt = $oPDO->prepare("insert into test_clob (id, data) values
(:id, EMPTY_CLOB())");
$iID = 1;
$oStmt->bindParam(':id', $iID);
if ($oStmt->execute()) {
$oStmt = $oPDO->prepare("update test_clob set data=:value where
id=1");
$sData = '<4000 bytes or more>';
$oStmt->bindParam(':value', $sData);
if ($oStmt->execute() === false) {
throw new Exception('Error on update clob');
}
} else {
throw new Exception('Error on insert EMPTY_CLOB');
}
$oStmt = $oPDO->prepare("select data from test_clob where id =
:id");
$oStmt->bindParam('id', $iID);
$oStmt->execute();
$oResult = $oStmt->fetch();
echo 'Read '.strlen(stream_get_contents($oResult['DATA'])).'
characters <br>';
} catch (Exception $oE) {
echo '<pre>';print_r($oStmt->errorInfo());echo "</pre><br>\n";
echo $oException->getMessage()."<br>\n";
}
$oPDO = null;
Expected result:
----------------
Read N characters (N >0)
Actual result:
--------------
Read 0 characters
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=39199&edit=1[/url]
diegotremper at gmail dot com Guest
-
jarismar_silva at adplabs dot com dot br #6
#39199 [Opn]: Cannot load Lob data with more than 4000 bytes on ORACLE 10
ID: 39199
User updated by: jarismar_silva at adplabs dot com dot br
Reported By: jarismar_silva at adplabs dot com dot br
Status: Open
Bug Type: PDO related
Operating System: SuSE, WinXP
PHP Version: 5.2.0
Assigned To: wez
New Comment:
Previously (when close the bug) I have tested on Slackware 11 with
Oracle Instant Client 10.2 and I stop getting this bug. The same on
another box running Kubuntu and Oracle Instant Client 10.2. But I got
the bug on a Suse server and many XP machines used on development.
Previous Comments:
------------------------------------------------------------------------
[2006-11-07 17:11:38] diegotremper at gmail dot com
I obtained in the same error on Windows XP SP2
------------------------------------------------------------------------
[2006-11-07 17:05:46] jarismar_silva at adplabs dot com dot br
I'm reopening this bug. I have found that this bug still occurs with
Oracle Client 10.2 and SuSE Enterprise Server v.9 Patch Lvl 3 / WinXP.
------------------------------------------------------------------------
[2006-10-23 12:17:04] jarismar_silva at adplabs dot com dot br
I'm closing this bug, as updating to new Oracle instant client seems to
solve the problem.
------------------------------------------------------------------------
[2006-10-23 12:10:12] jarismar_silva at adplabs dot com dot rb
I got this bug when working with Oracle instant client 10.2.0.1.
Upgrading to 10.2.0.2 solved the problem.
------------------------------------------------------------------------
[2006-10-19 14:59:33] jarismar_silva at adplabs dot com dot br
jarismar_silva at adplabs.com.br
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
[url]http://bugs.php.net/39199[/url]
--
Edit this bug report at [url]http://bugs.php.net/?id=39199&edit=1[/url]
jarismar_silva at adplabs dot com dot br Guest
-
tony2001@php.net #7
#39199 [Opn->Asn]: Cannot load Lob data with more than 4000 bytes on ORACLE 10
ID: 39199
Updated by: [email]tony2001@php.net[/email]
Reported By: jarismar_silva at adplabs dot com dot br
-Status: Open
+Status: Assigned
Bug Type: PDO related
Operating System: SuSE, WinXP
PHP Version: 5.2.0
Assigned To: wez
Previous Comments:
------------------------------------------------------------------------
[2006-11-07 17:25:44] jarismar_silva at adplabs dot com dot br
Previously (when close the bug) I have tested on Slackware 11 with
Oracle Instant Client 10.2 and I stop getting this bug. The same on
another box running Kubuntu and Oracle Instant Client 10.2. But I got
the bug on a Suse server and many XP machines used on development.
------------------------------------------------------------------------
[2006-11-07 17:11:38] diegotremper at gmail dot com
I obtained in the same error on Windows XP SP2
------------------------------------------------------------------------
[2006-11-07 17:05:46] jarismar_silva at adplabs dot com dot br
I'm reopening this bug. I have found that this bug still occurs with
Oracle Client 10.2 and SuSE Enterprise Server v.9 Patch Lvl 3 / WinXP.
------------------------------------------------------------------------
[2006-10-23 12:17:04] jarismar_silva at adplabs dot com dot br
I'm closing this bug, as updating to new Oracle instant client seems to
solve the problem.
------------------------------------------------------------------------
[2006-10-23 12:10:12] jarismar_silva at adplabs dot com dot rb
I got this bug when working with Oracle instant client 10.2.0.1.
Upgrading to 10.2.0.2 solved the problem.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
[url]http://bugs.php.net/39199[/url]
--
Edit this bug report at [url]http://bugs.php.net/?id=39199&edit=1[/url]
tony2001@php.net Guest
-
spatar at mail dot nnov dot ru #8
#39199 [Com]: Cannot load Lob data with more than 4000 bytes on ORACLE 10
ID: 39199
Comment by: spatar at mail dot nnov dot ru
Reported By: jarismar_silva at adplabs dot com dot br
Status: Assigned
Bug Type: PDO related
Operating System: SuSE, WinXP
PHP Version: 5.2.0
Assigned To: wez
New Comment:
I have the similar problem.
My database has charset AL32UTF8. If a CLOB column's length is >2730
characters, then PDO returns empty stream for such CLOB.
With single-byte charset US7ASCII I can easily get CLOB of lengthPHP: PHP 5.2.1RC3-dev (cli) (built: Feb 7 2007 16:57:25)>1000000 characters.
Oracle: 10.2.0.1.0
OS: SuSE Linux 9.2 (i586)
Reproduce code:
---------------
<?php
mb_internal_encoding("utf-8");
mb_http_output("utf-8");
ob_start("mb_output_handler");
try
{
$dbh = new PDO("oci:dbname=ORCL;charset=UTF8", "scott", "tiger");
// It seems that "UTF8" is only correct value for "charset" in PDO
constructor
// because with "UTF8" it can read CLOB up to 2730 characters,
// and with "UTF-8" or "AL32UTF8" it can read CLOB only up to 2048
characters.
// Am I wrong?
$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$test_lengths = array(2000, 2730, 2731, 4000);
foreach ($test_lengths as $test_length)
{
$dbh->beginTransaction();
$stmt = $dbh->prepare("update test_lob set col_lob = ?");
$stmt->bindValue(1, str_repeat("X", $test_length));
$stmt->execute();
$dbh->commit();
echo "Column updated to $test_length characters\n";
$stmt = $dbh->prepare("select * from test_lob");
$stmt->execute();
$stmt->setFetchMode(PDO::FETCH_NUM);
$result = $stmt->fetchAll();
echo "Read ".strlen(stream_get_contents($result[0][0]))."
characters\n\n";
}
}
catch (PDOException $e)
{
echo $e->getMessage()."\n";
print_r($e->errorInfo);
}
?>
Expected result:
----------------
Column updated to 2000 characters
Read 2000 characters
Column updated to 2730 characters
Read 2730 characters
Column updated to 2731 characters
Read 2731 characters
Column updated to 4000 characters
Read 4000 characters
Actual result:
--------------
Column updated to 2000 characters
Read 2000 characters
Column updated to 2730 characters
Read 2730 characters
Column updated to 2731 characters
Read 0 characters
SQLSTATE[HY000]: General error: 3127 OCIStmtExecute: ORA-03127: no new
operations allowed until the active operation ends
(/home/spatar/mvtm/www/php5.2-200701101130/ext/pdo_oci/oci_statement.c:142)
Array
(
[0] => HY000
[1] => 3127
[2] => OCIStmtExecute: ORA-03127: no new operations allowed until
the active operation ends
(/home/spatar/mvtm/www/php5.2-200701101130/ext/pdo_oci/oci_statement.c:142)
)
Segmentation fault
GDB backtrace:
--------------
#0 0x086ac65a in ?? ()
#1 0x00000008 in ?? ()
#2 0xb728a73e in kpulbcr () from
/u01/app/oracle/OraHome1/lib/libclntsh.so.10.1
#3 0xb75bec0c in ttcdrv () from
/u01/app/oracle/OraHome1/lib/libclntsh.so.10.1
#4 0xb74b3f11 in nioqwa () from
/u01/app/oracle/OraHome1/lib/libclntsh.so.10.1
#5 0xb7318327 in upirtrc () from
/u01/app/oracle/OraHome1/lib/libclntsh.so.10.1
#6 0xb728dfc6 in kpurcsc () from
/u01/app/oracle/OraHome1/lib/libclntsh.so.10.1
#7 0xb727c634 in kpulcls () from
/u01/app/oracle/OraHome1/lib/libclntsh.so.10.1
#8 0xb731dac2 in OCILobClose () from
/u01/app/oracle/OraHome1/lib/libclntsh.so.10.1
#9 0x08166de0 in oci_blob_close ()
#10 0x0828c66c in _php_stream_free ()
#11 0x0828c8c3 in stream_resource_regular_dtor ()
#12 0x082bf15e in list_entry_destructor ()
#13 0x082bd65b in zend_hash_del_key_or_index ()
#14 0x082bf31d in _zend_list_delete ()
#15 0x082aa669 in _zval_ptr_dtor ()
#16 0x082bd3e9 in zend_hash_destroy ()
#17 0x082b41c3 in _zval_dtor_func ()
#18 0x082aa669 in _zval_ptr_dtor ()
#19 0x082bd3e9 in zend_hash_destroy ()
#20 0x082b41c3 in _zval_dtor_func ()
#21 0x082aa669 in _zval_ptr_dtor ()
#22 0x082bd0ec in zend_hash_apply_deleter ()
#23 0x082bd2e7 in zend_hash_graceful_reverse_destroy ()
#24 0x082aca6d in shutdown_executor ()
#25 0x082b4bf7 in zend_deactivate ()
#26 0x0827b2f0 in php_request_shutdown ()
#27 0x0831a5f6 in main ()
Previous Comments:
------------------------------------------------------------------------
[2006-11-07 17:25:44] jarismar_silva at adplabs dot com dot br
Previously (when close the bug) I have tested on Slackware 11 with
Oracle Instant Client 10.2 and I stop getting this bug. The same on
another box running Kubuntu and Oracle Instant Client 10.2. But I got
the bug on a Suse server and many XP machines used on development.
------------------------------------------------------------------------
[2006-11-07 17:11:38] diegotremper at gmail dot com
I obtained in the same error on Windows XP SP2
------------------------------------------------------------------------
[2006-11-07 17:05:46] jarismar_silva at adplabs dot com dot br
I'm reopening this bug. I have found that this bug still occurs with
Oracle Client 10.2 and SuSE Enterprise Server v.9 Patch Lvl 3 / WinXP.
------------------------------------------------------------------------
[2006-10-23 12:17:04] jarismar_silva at adplabs dot com dot br
I'm closing this bug, as updating to new Oracle instant client seems to
solve the problem.
------------------------------------------------------------------------
[2006-10-23 12:10:12] jarismar_silva at adplabs dot com dot rb
I got this bug when working with Oracle instant client 10.2.0.1.
Upgrading to 10.2.0.2 solved the problem.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
[url]http://bugs.php.net/39199[/url]
--
Edit this bug report at [url]http://bugs.php.net/?id=39199&edit=1[/url]
spatar at mail dot nnov dot ru Guest
-
spatar at mail dot nnov dot ru #9
#39199 [Com]: Cannot load Lob data with more than 4000 bytes on ORACLE 10
ID: 39199
Comment by: spatar at mail dot nnov dot ru
Reported By: jarismar_silva at adplabs dot com dot br
Status: Assigned
Bug Type: PDO related
Operating System: SuSE, WinXP
PHP Version: 5.2.0
Assigned To: wez
New Comment:
Forgot to paste table creation in my previous post:
create table TEST_LOB
(
COL_LOB CLOB
);
insert into TEST_LOB values (NULL);
commit;
Also I've tested with PHP 5.2.1 and result is the same.
Previous Comments:
------------------------------------------------------------------------
[2007-02-27 12:42:22] spatar at mail dot nnov dot ru
I have the similar problem.
My database has charset AL32UTF8. If a CLOB column's length is >2730
characters, then PDO returns empty stream for such CLOB.
With single-byte charset US7ASCII I can easily get CLOB of lengthPHP: PHP 5.2.1RC3-dev (cli) (built: Feb 7 2007 16:57:25)>1000000 characters.
Oracle: 10.2.0.1.0
OS: SuSE Linux 9.2 (i586)
Reproduce code:
---------------
<?php
mb_internal_encoding("utf-8");
mb_http_output("utf-8");
ob_start("mb_output_handler");
try
{
$dbh = new PDO("oci:dbname=ORCL;charset=UTF8", "scott", "tiger");
// It seems that "UTF8" is only correct value for "charset" in PDO
constructor
// because with "UTF8" it can read CLOB up to 2730 characters,
// and with "UTF-8" or "AL32UTF8" it can read CLOB only up to 2048
characters.
// Am I wrong?
$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$test_lengths = array(2000, 2730, 2731, 4000);
foreach ($test_lengths as $test_length)
{
$dbh->beginTransaction();
$stmt = $dbh->prepare("update test_lob set col_lob = ?");
$stmt->bindValue(1, str_repeat("X", $test_length));
$stmt->execute();
$dbh->commit();
echo "Column updated to $test_length characters\n";
$stmt = $dbh->prepare("select * from test_lob");
$stmt->execute();
$stmt->setFetchMode(PDO::FETCH_NUM);
$result = $stmt->fetchAll();
echo "Read ".strlen(stream_get_contents($result[0][0]))."
characters\n\n";
}
}
catch (PDOException $e)
{
echo $e->getMessage()."\n";
print_r($e->errorInfo);
}
?>
Expected result:
----------------
Column updated to 2000 characters
Read 2000 characters
Column updated to 2730 characters
Read 2730 characters
Column updated to 2731 characters
Read 2731 characters
Column updated to 4000 characters
Read 4000 characters
Actual result:
--------------
Column updated to 2000 characters
Read 2000 characters
Column updated to 2730 characters
Read 2730 characters
Column updated to 2731 characters
Read 0 characters
SQLSTATE[HY000]: General error: 3127 OCIStmtExecute: ORA-03127: no new
operations allowed until the active operation ends
(/home/spatar/mvtm/www/php5.2-200701101130/ext/pdo_oci/oci_statement.c:142)
Array
(
[0] => HY000
[1] => 3127
[2] => OCIStmtExecute: ORA-03127: no new operations allowed until
the active operation ends
(/home/spatar/mvtm/www/php5.2-200701101130/ext/pdo_oci/oci_statement.c:142)
)
Segmentation fault
GDB backtrace:
--------------
#0 0x086ac65a in ?? ()
#1 0x00000008 in ?? ()
#2 0xb728a73e in kpulbcr () from
/u01/app/oracle/OraHome1/lib/libclntsh.so.10.1
#3 0xb75bec0c in ttcdrv () from
/u01/app/oracle/OraHome1/lib/libclntsh.so.10.1
#4 0xb74b3f11 in nioqwa () from
/u01/app/oracle/OraHome1/lib/libclntsh.so.10.1
#5 0xb7318327 in upirtrc () from
/u01/app/oracle/OraHome1/lib/libclntsh.so.10.1
#6 0xb728dfc6 in kpurcsc () from
/u01/app/oracle/OraHome1/lib/libclntsh.so.10.1
#7 0xb727c634 in kpulcls () from
/u01/app/oracle/OraHome1/lib/libclntsh.so.10.1
#8 0xb731dac2 in OCILobClose () from
/u01/app/oracle/OraHome1/lib/libclntsh.so.10.1
#9 0x08166de0 in oci_blob_close ()
#10 0x0828c66c in _php_stream_free ()
#11 0x0828c8c3 in stream_resource_regular_dtor ()
#12 0x082bf15e in list_entry_destructor ()
#13 0x082bd65b in zend_hash_del_key_or_index ()
#14 0x082bf31d in _zend_list_delete ()
#15 0x082aa669 in _zval_ptr_dtor ()
#16 0x082bd3e9 in zend_hash_destroy ()
#17 0x082b41c3 in _zval_dtor_func ()
#18 0x082aa669 in _zval_ptr_dtor ()
#19 0x082bd3e9 in zend_hash_destroy ()
#20 0x082b41c3 in _zval_dtor_func ()
#21 0x082aa669 in _zval_ptr_dtor ()
#22 0x082bd0ec in zend_hash_apply_deleter ()
#23 0x082bd2e7 in zend_hash_graceful_reverse_destroy ()
#24 0x082aca6d in shutdown_executor ()
#25 0x082b4bf7 in zend_deactivate ()
#26 0x0827b2f0 in php_request_shutdown ()
#27 0x0831a5f6 in main ()
------------------------------------------------------------------------
[2006-11-07 17:25:44] jarismar_silva at adplabs dot com dot br
Previously (when close the bug) I have tested on Slackware 11 with
Oracle Instant Client 10.2 and I stop getting this bug. The same on
another box running Kubuntu and Oracle Instant Client 10.2. But I got
the bug on a Suse server and many XP machines used on development.
------------------------------------------------------------------------
[2006-11-07 17:11:38] diegotremper at gmail dot com
I obtained in the same error on Windows XP SP2
------------------------------------------------------------------------
[2006-11-07 17:05:46] jarismar_silva at adplabs dot com dot br
I'm reopening this bug. I have found that this bug still occurs with
Oracle Client 10.2 and SuSE Enterprise Server v.9 Patch Lvl 3 / WinXP.
------------------------------------------------------------------------
[2006-10-23 12:17:04] jarismar_silva at adplabs dot com dot br
I'm closing this bug, as updating to new Oracle instant client seems to
solve the problem.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
[url]http://bugs.php.net/39199[/url]
--
Edit this bug report at [url]http://bugs.php.net/?id=39199&edit=1[/url]
spatar at mail dot nnov dot ru Guest
-
spatar at mail dot nnov dot ru #10
#39199 [Com]: Cannot load Lob data with more than 4000 bytes on ORACLE 10
ID: 39199
Comment by: spatar at mail dot nnov dot ru
Reported By: jarismar_silva at adplabs dot com dot br
Status: Assigned
Bug Type: PDO related
Operating System: SuSE, WinXP
PHP Version: 5.2.0
Assigned To: wez
New Comment:
A quote from OCILobRead() documentation:
"If the callback function is not defined, then the OCI_NEED_DATA error
code will be returned. The application must call OCILobRead() over and
over again to read more pieces of the LOB until the OCI_NEED_DATA error
code is not returned."
A quote from OCILobWrite() documentation:
"If no callback function is defined, then OCILobWrite() returns the
OCI_NEED_DATA error code. The application must call OCILobWrite() again
to write more pieces of the LOB."
I propose the patch for php-5.2.1/ext/pdo_oci/oci_statement.c:
614c614
< if (r != OCI_SUCCESS) {
---633c633> if ((r != OCI_SUCCESS) && (r != OCI_NEED_DATA)) {
< if (r != OCI_SUCCESS) {
---> if ((r != OCI_SUCCESS) && (r != OCI_NEED_DATA)) {
Previous Comments:
------------------------------------------------------------------------
[2007-02-27 13:09:31] spatar at mail dot nnov dot ru
Forgot to paste table creation in my previous post:
create table TEST_LOB
(
COL_LOB CLOB
);
insert into TEST_LOB values (NULL);
commit;
Also I've tested with PHP 5.2.1 and result is the same.
------------------------------------------------------------------------
[2007-02-27 12:42:22] spatar at mail dot nnov dot ru
I have the similar problem.
My database has charset AL32UTF8. If a CLOB column's length is >2730
characters, then PDO returns empty stream for such CLOB.
With single-byte charset US7ASCII I can easily get CLOB of lengthPHP: PHP 5.2.1RC3-dev (cli) (built: Feb 7 2007 16:57:25)>1000000 characters.
Oracle: 10.2.0.1.0
OS: SuSE Linux 9.2 (i586)
Reproduce code:
---------------
<?php
mb_internal_encoding("utf-8");
mb_http_output("utf-8");
ob_start("mb_output_handler");
try
{
$dbh = new PDO("oci:dbname=ORCL;charset=UTF8", "scott", "tiger");
// It seems that "UTF8" is only correct value for "charset" in PDO
constructor
// because with "UTF8" it can read CLOB up to 2730 characters,
// and with "UTF-8" or "AL32UTF8" it can read CLOB only up to 2048
characters.
// Am I wrong?
$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$test_lengths = array(2000, 2730, 2731, 4000);
foreach ($test_lengths as $test_length)
{
$dbh->beginTransaction();
$stmt = $dbh->prepare("update test_lob set col_lob = ?");
$stmt->bindValue(1, str_repeat("X", $test_length));
$stmt->execute();
$dbh->commit();
echo "Column updated to $test_length characters\n";
$stmt = $dbh->prepare("select * from test_lob");
$stmt->execute();
$stmt->setFetchMode(PDO::FETCH_NUM);
$result = $stmt->fetchAll();
echo "Read ".strlen(stream_get_contents($result[0][0]))."
characters\n\n";
}
}
catch (PDOException $e)
{
echo $e->getMessage()."\n";
print_r($e->errorInfo);
}
?>
Expected result:
----------------
Column updated to 2000 characters
Read 2000 characters
Column updated to 2730 characters
Read 2730 characters
Column updated to 2731 characters
Read 2731 characters
Column updated to 4000 characters
Read 4000 characters
Actual result:
--------------
Column updated to 2000 characters
Read 2000 characters
Column updated to 2730 characters
Read 2730 characters
Column updated to 2731 characters
Read 0 characters
SQLSTATE[HY000]: General error: 3127 OCIStmtExecute: ORA-03127: no new
operations allowed until the active operation ends
(/home/spatar/mvtm/www/php5.2-200701101130/ext/pdo_oci/oci_statement.c:142)
Array
(
[0] => HY000
[1] => 3127
[2] => OCIStmtExecute: ORA-03127: no new operations allowed until
the active operation ends
(/home/spatar/mvtm/www/php5.2-200701101130/ext/pdo_oci/oci_statement.c:142)
)
Segmentation fault
GDB backtrace:
--------------
#0 0x086ac65a in ?? ()
#1 0x00000008 in ?? ()
#2 0xb728a73e in kpulbcr () from
/u01/app/oracle/OraHome1/lib/libclntsh.so.10.1
#3 0xb75bec0c in ttcdrv () from
/u01/app/oracle/OraHome1/lib/libclntsh.so.10.1
#4 0xb74b3f11 in nioqwa () from
/u01/app/oracle/OraHome1/lib/libclntsh.so.10.1
#5 0xb7318327 in upirtrc () from
/u01/app/oracle/OraHome1/lib/libclntsh.so.10.1
#6 0xb728dfc6 in kpurcsc () from
/u01/app/oracle/OraHome1/lib/libclntsh.so.10.1
#7 0xb727c634 in kpulcls () from
/u01/app/oracle/OraHome1/lib/libclntsh.so.10.1
#8 0xb731dac2 in OCILobClose () from
/u01/app/oracle/OraHome1/lib/libclntsh.so.10.1
#9 0x08166de0 in oci_blob_close ()
#10 0x0828c66c in _php_stream_free ()
#11 0x0828c8c3 in stream_resource_regular_dtor ()
#12 0x082bf15e in list_entry_destructor ()
#13 0x082bd65b in zend_hash_del_key_or_index ()
#14 0x082bf31d in _zend_list_delete ()
#15 0x082aa669 in _zval_ptr_dtor ()
#16 0x082bd3e9 in zend_hash_destroy ()
#17 0x082b41c3 in _zval_dtor_func ()
#18 0x082aa669 in _zval_ptr_dtor ()
#19 0x082bd3e9 in zend_hash_destroy ()
#20 0x082b41c3 in _zval_dtor_func ()
#21 0x082aa669 in _zval_ptr_dtor ()
#22 0x082bd0ec in zend_hash_apply_deleter ()
#23 0x082bd2e7 in zend_hash_graceful_reverse_destroy ()
#24 0x082aca6d in shutdown_executor ()
#25 0x082b4bf7 in zend_deactivate ()
#26 0x0827b2f0 in php_request_shutdown ()
#27 0x0831a5f6 in main ()
------------------------------------------------------------------------
[2006-11-07 17:25:44] jarismar_silva at adplabs dot com dot br
Previously (when close the bug) I have tested on Slackware 11 with
Oracle Instant Client 10.2 and I stop getting this bug. The same on
another box running Kubuntu and Oracle Instant Client 10.2. But I got
the bug on a Suse server and many XP machines used on development.
------------------------------------------------------------------------
[2006-11-07 17:11:38] diegotremper at gmail dot com
I obtained in the same error on Windows XP SP2
------------------------------------------------------------------------
[2006-11-07 17:05:46] jarismar_silva at adplabs dot com dot br
I'm reopening this bug. I have found that this bug still occurs with
Oracle Client 10.2 and SuSE Enterprise Server v.9 Patch Lvl 3 / WinXP.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
[url]http://bugs.php.net/39199[/url]
--
Edit this bug report at [url]http://bugs.php.net/?id=39199&edit=1[/url]
spatar at mail dot nnov dot ru Guest



Reply With Quote

