|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-01-08 20:31 UTC] dtbaker at gmail dot com
[2008-01-08 22:34 UTC] dtbaker at gmail dot com
[2008-01-30 13:53 UTC] christopher dot jones at oracle dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Dec 14 18:00:02 2025 UTC |
Description: ------------ Hello, I am using OCI8 version 1.2.4 and Oracle Instant Client 10.2.0.3 to connect to an Oracle 10g Express database. My code works correctly when using oci_connect() or oci_new_connect() however when I try to use oci_pconnect() i get these in the apache error log: [notice] child pid 17517 exit signal Segmentation fault (11) I have been trying to solve this problem on an off for a month, different versions of instant client/php/etc.. every time just reverting back to using oci_connect(). A request to the oci_pconnect() php script works correctly the first time it is called after an apache restart. Subsequent requests do not always work, causing seg faults. The behavior seems to be random. Sometimes I get another error along with the seg fault: oci_fetch_array() [function.oci-fetch-array]: ORA-24338: statement handle not executed in /var/www/html/oracle_script.php I have tried to do a gdb backtrace however I can't seem to make it catch the seg faulted child process, should I be running apache in a different mode in order to do the gdb backtrace? # httpd -V Server version: Apache/2.2.6 (Unix) Architecture: 32-bit Server MPM: Prefork threaded: no forked: yes Regards, Dave Reproduce code: --------------- $conn=oci_pconnect(_DB_USER,_DB_PASS,_DB_HOST,"AL32UTF8"); $sql = 'BEGIN "XXXXXSelect"(:Cursor,:ErrorNumber,:ErrorText); END;'; $stmt = oci_parse($conn, $sql); $p_cursor = oci_new_cursor($conn); oci_bind_by_name($stmt, ":Cursor", $p_cursor, -1, OCI_B_CURSOR); oci_bind_by_name($stmt, ":ErrorNumber", $ErrorNumber, 18, SQLT_LNG); oci_bind_by_name($stmt, ":ErrorText", $ErrorText, 4000, SQLT_CHR); oci_execute($stmt); oci_execute($p_cursor); $DataArray=array(); while($row = oci_fetch_array($p_cursor, OCI_ASSOC)) { $DataArray[$row['XXXXID']][$row['XXXXID']] = $row; } oci_free_statement($stmt); oci_free_statement($p_cursor); Actual result: -------------- in Apache error.log: oci_fetch_array() [function.oci-fetch-array]: ORA-24338: statement handle not executed in /var/www/html/oracle_script.php [notice] child pid 17517 exit signal Segmentation fault (11)