|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-12-07 08:39 UTC] sixd@php.net
-Status: Open
+Status: Duplicate
[2010-12-07 08:39 UTC] sixd@php.net
[2016-03-08 01:28 UTC] sixd@php.net
-Package: PDO related
+Package: PDO OCI
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 19:00:01 2025 UTC |
Description: ------------ when fetching a clob value with pdo oci a segmentation fault is generated when the result contains more than one entry. works fine with only one result. db: column name data type ID NUMBER LARGE CLOB Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product Zend Server Community Edition Version 5.0.3 Apache/2.2.15 (Unix) PHP/5.3.3 oci8 Version 1.4.1 Revision $Revision: 293235 $ Test script: --------------- // LARGE is a CLOB, the database contains 2 entries with id=1 $sql = 'SELECT ID, LARGE FROM TEST WHERE ID LIKE :id'; $bind = array(':id'=>'%1'); $rows = null; try { $pdo = new PDO('oci:dbname=xe;host=localhost:1521','username','pw'); $statement = $pdo->prepare($sql); foreach($bind as $key=>$value) { $statement->bindValue($key,$value); } $result = $statement->execute(); if( $result ) $rows = $statement->fetchAll(PDO::FETCH_ASSOC); } catch (PDOException $e) { die($e->getMessage()); } count($rows) > 0 ? $problem = stream_get_contents($rows[0]['LARGE']) : $problem = 'empty'; echo $problem; Expected result: ---------------- the first 'LARGE' value Actual result: -------------- [Thread debugging using libthread_db enabled] [New Thread 0x110ac0 (LWP 10305)] Detaching after fork from child process 10308. Detaching after fork from child process 10309. Program received signal SIGSEGV, Segmentation fault. 0x04926761 in kghufree () from /usr/local/zend/lib/libclntsh.so.11.1 (gdb) bt #0 0x04926761 in kghufree () from /usr/local/zend/lib/libclntsh.so.11.1 #1 0x04913f27 in kohfrem () from /usr/local/zend/lib/libclntsh.so.11.1 #2 0x04913668 in kohfrr () from /usr/local/zend/lib/libclntsh.so.11.1 #3 0x0491360e in kohfrw () from /usr/local/zend/lib/libclntsh.so.11.1 #4 0x048eb068 in kollfrfn () from /usr/local/zend/lib/libclntsh.so.11.1 #5 0x03144fd7 in kpufdesc2 () from /usr/local/zend/lib/libclntsh.so.11.1 #6 0x03147dcb in kpufdesc () from /usr/local/zend/lib/libclntsh.so.11.1 #7 0x0311ce40 in OCIDescriptorFree () from /usr/local/zend/lib/libclntsh.so.11.1 #8 0x0021f2ca in ?? () from /usr/local/zend/lib/php_extensions/pdo_oci.so #9 0x0956e0cc in ?? () #10 0x00000032 in ?? () #11 0x0956e0cc in ?? () #12 0x013a956c in ?? () from /usr/local/zend/apache2/modules/libphp5.so #13 0x09450264 in ?? () #14 0x00000000 in ?? ()