|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36010 Crash when executing SQL statment with lob parameter after another SQL statment
Submitted: 2006-01-14 15:38 UTC Modified: 2006-02-04 12:37 UTC
Avg. Score:4.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:0 (0.0%)
From: spatar at mail dot nnov dot ru Assigned: tony2001
Status: Closed Package: OCI8 related
PHP Version: 5.1.2 OS: SuSE Linux 9.2 (i586)
Private report: No CVE-ID:
 [2006-01-14 15:38 UTC] spatar at mail dot nnov dot ru
OCI8 crashes in call "oci_execute" when executing some SQL statment with binded lob parameter after another SQL statment.
Previous version (PHP 5.1.1) doesn't produce this bug.

More details:
OS: SuSE Linux 9.2 (i586)
uname -a: Linux www 2.6.8-24-smp #1 SMP Wed Oct 6 09:16:23 UTC 2004 i686 i686 i386 GNU/Linux
Apache 2.2.0
PHP 5.1.2

Reproduce code:
        function f($conn)
                $sql =  "begin :p_clob := 'lob string'; 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 $clob->load(), "\n";
        $conn = oci_connect("voip_dev", "9", "RS21");

Expected result:
lob string
lob string

Actual result:
#0  0xb6cfdc73 in kpufGetRcvInfo () from /u01/app/oracle/OraHome2/lib/
#1  0xb6f489b5 in ttcacr () from /u01/app/oracle/OraHome2/lib/
#2  0xb6f4a807 in ttcdrv () from /u01/app/oracle/OraHome2/lib/
#3  0xb6dec4ad in nioqwa () from /u01/app/oracle/OraHome2/lib/
#4  0xb6c5e07e in upirtrc () from /u01/app/oracle/OraHome2/lib/
#5  0xb6bf4d35 in kpurcsc () from /u01/app/oracle/OraHome2/lib/
#6  0xb6bb1831 in kpuexecv8 () from /u01/app/oracle/OraHome2/lib/
#7  0xb6bb33ac in kpuexec () from /u01/app/oracle/OraHome2/lib/
#8  0xb6c27b86 in OCIStmtExecute () from /u01/app/oracle/OraHome2/lib/
#9  0xb788ba64 in php_oci_statement_execute (statement=0x82f6c84, mode=137325732)
    at /home/spatar/mvtm-www/php-5.1.2/ext/oci8/oci8_statement.c:321
#10 0xb788fa7a in zif_oci_execute (ht=2, return_value=0xb640b02c, return_value_ptr=0x0, this_ptr=0x0,
    return_value_used=1) at /home/spatar/mvtm-www/php-5.1.2/ext/oci8/oci8_interface.c:1276
#11 0xb7a07d7b in zend_do_fcall_common_helper_SPEC (execute_data=0xbfffc240) at zend_vm_execute.h:192
#12 0xb7a56fbd in execute (op_array=0x82a6330) at zend_vm_execute.h:92
#13 0xb7a07836 in zend_do_fcall_common_helper_SPEC (execute_data=0xbfffc390) at zend_vm_execute.h:226
#14 0xb7a56fbd in execute (op_array=0x829df04) at zend_vm_execute.h:92
#15 0xb79eaf8f in zend_execute_scripts (type=8, retval=0x0, file_count=3)
    at /home/spatar/mvtm-www/php-5.1.2/Zend/zend.c:1101
#16 0xb79b01ae in php_execute_script (primary_file=0xbfffe6e0) at /home/spatar/mvtm-www/php-5.1.2/main/main.c:1720
#17 0xb7a57ac1 in php_handler (r=0x82799d0) at /home/spatar/mvtm-www/php-5.1.2/sapi/apache2handler/sapi_apache2.c:584
#18 0x0807756b in ap_run_handler ()


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-01-14 15:48 UTC]
Assigned to the maintainer.
 [2006-02-03 12:42 UTC] robertg2 at hope dot ac dot uk
I have the same problem.

Oracle InstantClient
PHP 5.0.4
oci8 from cvs (1.292 at 2006-02-03)
Suse Linux 10.0 (2.6.13-15-default)

Reverted back to oci8 pecl beta release 1.1.1 which doesn't  suffer from the issue.
 [2006-02-03 15:47 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

Thanks for the last comment, it was _very_ helpful.
 [2006-02-04 12:37 UTC] spatar at mail dot nnov dot ru
Thank you. It works now.
PHP Copyright © 2001-2015 The PHP Group
All rights reserved.
Last updated: Wed Nov 25 10:02:22 2015 UTC