php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57339 oci_execute segmentation fault on PHP CLI
Submitted: 2006-11-02 13:16 UTC Modified: 2012-10-26 05:41 UTC
From: jeff at newnewmedia dot com Assigned:
Status: No Feedback Package: *General Issues
PHP Version: 5.1.1 OS: SuSE Linux 9.2
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: jeff at newnewmedia dot com
New email:
PHP Version: OS:

 

 [2006-11-02 13:16 UTC] jeff at newnewmedia dot com
Description:
------------
Calling a certain query via oci_execute causes PHP to segmentation fault.

PHP 5.1.1 (cli) (built: Dec  6 2005 17:34:08)

oci8
OCI8 Support => enabled
Revision => $Revision: 1.269.2.3 $
Oracle Version => 9.2

Reproduce code:
---------------
$user = 'XX';
$pass = 'XX';
$db = 'XX';
$table = 'PEOPLE';

$conn = oci_connect($user, $pass, $db);
if (!$conn) {
  $e = oci_error();
  print htmlentities($e['message']);
  exit;
}

print $query = "SELECT column_name FROM user_tab_columns WHERE table_name='$table' ORDER BY column_id";

$stid = oci_parse($conn, $query);
$r = oci_execute($stid, OCI_DEFAULT);

Expected result:
----------------
oci_execute should return true

Actual result:
--------------
GNU gdb 6.2.1
Copyright 2004 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 "i586-suse-linux"...Using host libthread_db library "/lib/tls/libthread_db.so.1".

(gdb) run oracle-php-cli-bug.php 
Starting program: /ibm_local/usr/util/web/apache_1.3.33/util/php5/bin/php oracle-php-cli-bug.php
[Thread debugging using libthread_db enabled]
[New Thread 1088095712 (LWP 2127)]
SELECT column_name FROM user_tab_columns WHERE table_name='People' OR table_name='PEOPLE' ORDER BY column_id
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1088095712 (LWP 2127)]
0x40cfd5fc in memcpy () from /lib/tls/libc.so.6
(gdb) backtrace
#0  0x40cfd5fc in memcpy () from /lib/tls/libc.so.6
#1  0x4070c8b0 in ttcclr () from /util/oracle/lib/libclntsh.so.9.0
#2  0x4070a16b in ttcrbur () from /util/oracle/lib/libclntsh.so.9.0
#3  0x4070a641 in ttcbur () from /util/oracle/lib/libclntsh.so.9.0
#4  0x406f969e in ttcdrv () from /util/oracle/lib/libclntsh.so.9.0
#5  0x405d0248 in nioqwa () from /util/oracle/lib/libclntsh.so.9.0
#6  0x404243d0 in upirtrc () from /util/oracle/lib/libclntsh.so.9.0
#7  0x403e69da in kpurcsc () from /util/oracle/lib/libclntsh.so.9.0
#8  0x403a91c4 in kpuexecv8 () from /util/oracle/lib/libclntsh.so.9.0
#9  0x403aad97 in kpuexec () from /util/oracle/lib/libclntsh.so.9.0
#10 0x40408a2f in OCIStmtExecute () from /util/oracle/lib/libclntsh.so.9.0
#11 0x08133eb1 in oci_execute ()
#12 0x0813d768 in zif_oci_execute ()
#13 0x082c8118 in zend_do_fcall_common_helper_SPEC ()
#14 0x082cabec in ZEND_DO_FCALL_SPEC_CONST_HANDLER ()
#15 0x082c7dde in execute ()
#16 0x082a2a6a in zend_execute_scripts ()
#17 0x082642f6 in php_execute_script ()
#18 0x083090ce in main ()


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-11-08 03:41 UTC] tony2001 at phpclub dot net
Cannot reproduce.
 [2007-05-29 10:47 UTC] adavey at cj dot com
Am getting the same issue.  Instead of doing what is expected, i am getting: child process exited with status 3221225477 within the apache error logs.

Cant seem to find any help/resolution to the problem.
 [2012-10-26 05:41 UTC] sixd@php.net
-Status: Feedback +Status: No Feedback -Package: oci8 +Package: *General Issues
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 10:01:31 2024 UTC