#37292 [Opn->Fbk]: loading CLOBs crashes php in oci8
| From: | tony2001@php.net | Date: | Wed, 03 May 2006 14:00:58 +0000 |
| Subject: | #37292 [Opn->Fbk]: loading CLOBs crashes php in oci8 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-96549@lists.php.net to get a copy of this message | ||
ID: 37292
Updated by: tony2001@php.net
Reported By: crescentfreshpot at yahoo dot com
-Status: Open
+Status: Feedback
Bug Type: OCI8 related
Operating System: WinXP
PHP Version: 5.1.3
New Comment:
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php
for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php
for Win32
Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.
Works perfectly fine on Linux.
Previous Comments:
------------------------------------------------------------------------
[2006-05-03 13:46:07] crescentfreshpot at yahoo dot com
Description:
------------
OCI-Lob->read()/load() crashes php when reading clobs.
using 10g instant client, oracle v10.1.0.2.0.
Works in 5.1.3RC2 and prior (prior to fix for bug #36934 ).
Reproduce code:
---------------
sql:
alter session set current_schema = scott;
create table lobtest (lobdata clob);
insert into lobtest (lobdata) values('data data data data data data
data data');
commit;
php:
error_reporting(E_ALL);
//oci_internal_debug(1);
// uncommenting above shows the script crashes at
// OCILobRead2 at (ext\oci8\oci8_lob.c:242)
// introduced in the fix for bug #36934
$conn = oci_connect('scott', 'tiger', 'xxx')
or die('Cannot connect');
$stmt = oci_parse($conn, "select lobdata from lobtest");
oci_execute($stmt);
list($lob) = oci_fetch_row($stmt);
oci_free_statement($stmt); // 5.1.2 crashes without this
if($lob) {
$data = $lob->read(256);
//$data = $lob->load(); // this fails too
var_dump($data);
$lob->free(); // 5.1.2 crashes without this
}
Expected result:
----------------
string(39) "data data data data data data data data"
Actual result:
--------------
php crash
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=37292&edit=1