ID: 36607 User updated by: jreed at myers dot com Reported By: jreed at myers dot com -Status: Feedback +Status: Open Bug Type: OCI8 related Operating System: Linux - 386 PHP Version: 5.1.2 New Comment:
Using latest PHP snapshot php5.1-200603062130 w/ OCI8 module $Revision: 1.269.2.10 $ Apache v2.2.0 Oracle Instant Client v10.2 SQL query still results in seg fault. Here is the backtrace: Detaching after fork from child process 17169. Program received signal SIGSEGV, Segmentation fault. [Switching to Thread -150749056 (LWP 17160)] 0x052373da in ttcfopr () from /usr/local/instantclient/lib/libclntsh.so.10.1 (gdb) (gdb) bt #0 0x052373da in ttcfopr () from /usr/local/instantclient/lib/libclntsh.so.10.1 #1 0x0522e698 in ttcdrv () from /usr/local/instantclient/lib/libclntsh.so.10.1 #2 0x05114ec5 in nioqwa () from /usr/local/instantclient/lib/libclntsh.so.10.1 #3 0x04f82d97 in upirtrc () from /usr/local/instantclient/lib/libclntsh.so.10.1 #4 0x04ef8a36 in kpurcsc () from /usr/local/instantclient/lib/libclntsh.so.10.1 #5 0x04eae07b in kpuexecv8 () from /usr/local/instantclient/lib/libclntsh.so.10.1 #6 0x04eb040a in kpuexec () from /usr/local/instantclient/lib/libclntsh.so.10.1 #7 0x04f87902 in OCIStmtExecute () from /usr/local/instantclient/lib/libclntsh.so.10.1 #8 0x002fa205 in php_oci_statement_execute (statement=0x949ca8c, mode=155822076) at /root/php5.1-200603062130/ext/oci8/oci8_statement.c:321 #9 0x002ff712 in zif_oci_execute (ht=2, return_value=0x957fccc, return_value_ptr=0x0, this_ptr=0x0, return_value_used=0) at /root/php5.1-200603062130/ext/oci8/oci8_interface.c:1276 #10 0x0120772d in zend_do_fcall_common_helper_SPEC (execute_data=0xfef25690) at zend_vm_execute.h:192 #11 0x004c73ef in get_module () from /usr/local/Zend/lib/Optimizer-2_6_1/php-5.1.x/ZendOptimizer.so #12 0xfef25690 in ?? () #13 0xfef25690 in ?? () #14 0x00000001 in ?? () #15 0x09319308 in ?? () #16 0xfef255d4 in ?? () #17 0x00000000 in ?? () Previous Comments: ------------------------------------------------------------------------ [2006-03-05 08:39:17] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.1-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.1-win32-latest.zip Please provide the backtrace if you're still able to reproduce it with the latest snapshot. ------------------------------------------------------------------------ [2006-03-03 20:13:25] jreed at myers dot com Description: ------------ When oci8.default_prefetch is set to anything but zero, executing a SQL statement that uses a dbLink and only returns a single row causes Apache to seg fault. If oci8.default_prefetch is set to zero then it works fine. This problem only seems to occur if you do a SELECT *. If you identify the exact columns to select then it works fine. Also, the same statement works fine, even with SELECT *, if you connect to the database directly. It only fails if accessing through a dbLink. Reproduce code: --------------- $sql = " select * from [EMAIL PROTECTED] where table_id = $some_id "; $stmt = ociparse($conn, $sql); ociexecute($stmt, OCI_DEFAULT); ocifetchinto($stmt, $row, OCI_ASSOC); ocifreestatement($stmt); Expected result: ---------------- $row is a populated associative array with all the columns from the table row requested. Actual result: -------------- Apache seg faults immediately after the ociexecute() call. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=36607&edit=1