|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24019 Segmentation Fault after the execution of php with Oracle connection
Submitted: 2003-06-04 11:07 UTC Modified: 2003-06-09 08:42 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: e_zagrai at yahoo dot com Assigned:
Status: No Feedback Package: OCI8 related
PHP Version: 4.3.2 OS: RedHat 8.0
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: e_zagrai at yahoo dot com
New email:
PHP Version: OS:


 [2003-06-04 11:07 UTC] e_zagrai at yahoo dot com
The following code used to work on Oracle 8.0 on Solaris.

print "Test";
$connection = OCILogon("user","xxx", "mydb") or die("Couldn't logon.");
$sql = "select count(*) from x";
$sql_statement = OCIParse($connection,$sql) or die("Couldn't parse statement.");
OCIExecute($sql_statement, OCI_DEFAULT) or die("Couldn't execute statement.");
$num_columns = OCINumCols($sql_statement);

Now, under Redhat 8.0 and Oracle 9i, after 2-3 times of successful executing of this php code you get the error "Document contains no data" every time you try to execute it again. If I execute any other php without Oracle interaction - it works. The only thing I can do to be able to execute the code with Oracle interaction is to restart Apache. 

Apache's error log contains the line:  
[Wed Jun 04 09:16:40 2003] [notice] child pid 3340 exit signal Segmentation fault (11)

PHP is built with

./configure  --prefix=usr/local/php --with-gd=/usr/local
--with-png-dir=/usr/local --with-oci8=/oracle
--with-apx2=/usr/local/apache/bin/apxs --with-jpeg-dir=/usr
--with-zlib-dir=/usr --with-xpm-dir=/usr --enable-debug

I tryed to backtrace the error and that's what I've got:

[root@cmn bin]# gdb /usr/local/apache/bin/httpd
GNU gdb Red Hat Linux (5.2.1-4)
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain  conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux"...
(gdb) run -X
Starting program: /usr/local/apache/bin/httpd -X
[New Thread 8192 (LWP 3518)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 8192 (LWP 3518)]
0x405fddfa in kpuhhaloc () from /oracle/lib/
(gdb) bt
#0  0x405fddfa in kpuhhaloc () from /oracle/lib/
#1  0x4060e15f in kpughndl0 () from /oracle/lib/
#2  0x40614543 in kpughndl () from /oracle/lib/
#3  0x40668dd6 in OCIHandleAlloc () from /oracle/lib/
#4  0x402ebb93 in _oci_open_session (server=0x81d3d60,
username=0x81ed764 "xxx", password="xxx", persistent=0,
    exclusive=0, charset=0x403eb827 "") at
#5  0x402ed1e4 in oci_do_connect (ht=3, return_value=0x81ed84c,
this_ptr=0x0, return_value_used=1, persistent=0, exclusive=0)
    at /arc/php-4.3.2/ext/oci8/oci8.c:2685
#6  0x402f19d4 in zif_ocilogon (ht=3, return_value=0x81ed84c,
this_ptr=0x0, return_value_used=1) at
#7  0x403dd592 in execute (op_array=0x81d20c4) at
#8  0x403cc1bd in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /arc/php-4.3.2/Zend/zend.c:869
#9  0x40396464 in php_execute_script (primary_file=0xbffff600) at
#10 0x403e32a5 in php_handler (r=0x81dc998) at
#11 0x080903e6 in ap_run_handler (r=0x81dc998) at config.c:195
#12 0x080908fe in ap_invoke_handler (r=0x81dc998) at config.c:401
#13 0x08080813 in ap_process_request (r=0x81dc998) at
#14 0x0807ca51 in ap_process_http_connection (c=0x81c8920) at
#15 0x080993d6 in ap_run_process_connection (c=0x81c8920) at
#16 0x0808ef9c in child_main (child_num_arg=0) at prefork.c:696
#17 0x0808f146 in make_child (s=0x80f0c08, slot=0) at prefork.c:736
#18 0x0808f19f in startup_children (number_to_start=5) at prefork.c:808
#19 0x0808f891 in ap_mpm_run (_pconf=0x808e878, plog=0x8125e70,
s=0x80f0c08) at prefork.c:1024
#20 0x080945aa in main (argc=2, argv=0xbffff8d4) at main.c:660
#21 0x420158d4 in __libc_start_main () from /lib/i686/

Thanks in advance for your help ,



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-06-09 08:42 UTC]
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Feb 23 05:01:27 2024 UTC