From:             louis dot begin at cspq dot gouv dot qc dot ca
Operating system: zVM/Linux
PHP version:      5.2.6
PHP Bug Type:     OCI8 related
Bug description:  Segmentation fault with OCI8

Description:
------------
Envir:
Oracle version 10.2.0.3 (64bits)
Envir.: zVM Linux
Linux Suse SLES10 (64bits)
:>uname -a
Linux CSIGDSA1 2.6.16.46-0.12-default #1 SMP Thu May 17 14:00:09 UTC 2007
s390x s390x s390x GNU/Linux

:>cat /etc/SuSE-release
SUSE Linux Enterprise Server 10 (s390x)
VERSION = 10
PATCHLEVEL = 1

phpinfo.php works fine

When executing "OCILogon(...)"
the connection to oracle occurs (listener.log "sees" it), but when
returning to to prog.:
[Fri Jul 18 09:27:16 2008] [notice] child pid 17963 exit signal
Segmentation fault (11)

Reproduce code:
---------------
<?php

  $oracle_on_localhost = TRUE;

  $conn = OCILogon("dri", "xxxxxxxx", "SIGUBTM");

  if (!$conn) {
         exit;
     }

  echo OCIServerVersion($conn) ."<br>\n";
  print date('Y-m-d H:i:s')."<br><br>\n";

  $cmdstr = "select code_client, client from dri.client";

  $parsed = OCIParse($conn, $cmdstr);
  OCIExecute($parsed, OCI_DEFAULT);

  echo "<html><head><title>Oracle Test avec PHP</title></head><body>";
  echo "<center><h2>Oracle Test avec PHP</h2><br>";

  print '<table border="1">';
  while ($succ = OCIFetchInto($stid, $row, OCI_RETURN_NULLS)) {
      print '<tr>';
      foreach ($row as $item) {
         print '<td>'.($item?htmlentities($item):'&nbsp;').'</td>';
      }
      print '</tr>';
  }
  print '</table>';

  echo "<tr><td colspan='2'> Nombre de rangees:
$nrows</td></tr></table>";
  echo "<br><em>Si vous voyez les donnees, ca
marche!</em><br></center></body></html>\n";

  OCILogoff($conn);
?>

Expected result:
----------------
The contains of rows from 
select code_client, client from dri.client

(The piece of code comes from:
http://www.oracle.com/technology/tech/php/htdocs/inst_php_apache_linux.html
with modification to match an existing table.

Actual result:
--------------
CSIGDSA1:/parm/oracle/bin # gdb /logiciels/tldb/httpd-2.0.61/bin/httpd
GNU gdb 6.6
Copyright (C) 2006 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 "s390x-suse-linux"...
Using host libthread_db library "/lib64/libthread_db.so.1".
(gdb) run -X
Starting program: /logiciels/tldb/httpd-2.0.61/bin/httpd -X
[Thread debugging using libthread_db enabled]
[New Thread 2199026468240 (LWP 9613)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 2199026468240 (LWP 9613)]
_zval_ptr_dtor (zval_ptr=0x3ffffbdcb28)
    at /logiciels/tldb/php/php-5.2.6/Zend/zend_execute_API.c:412
412             (*zval_ptr)->refcount--;
(gdb) bt
#0  _zval_ptr_dtor (zval_ptr=0x3ffffbdcb28)
    at /logiciels/tldb/php/php-5.2.6/Zend/zend_execute_API.c:412
#1  0x00000200006094d6 in zend_do_fcall_common_helper_SPEC
(execute_data=0x3ffffbdd160)
    at /logiciels/tldb/php/php-5.2.6/Zend/zend_execute.h:155
#2  0x00000200005f79a2 in execute (op_array=0x20001e41a98)
    at /logiciels/tldb/php/php-5.2.6/Zend/zend_vm_execute.h:92
#3  0x00000200005d4258 in zend_execute_scripts (type=<value optimized
out>, retval=0x0,
    file_count=2) at /logiciels/tldb/php/php-5.2.6/Zend/zend.c:1134
#4  0x000002000058bd78 in php_execute_script (primary_file=0x3ffffbdf770)
    at /logiciels/tldb/php/php-5.2.6/main/main.c:2005
#5  0x0000020000667e4c in php_handler (r=0x80270b00)
    at
/logiciels/tldb/php/php-5.2.6/sapi/apache2handler/sapi_apache2.c:629
#6  0x0000000080048e20 in ap_run_handler (r=0x80270b00) at config.c:152
#7  0x000000008004c33a in ap_invoke_handler (r=0x80270b00) at
config.c:364
#8  0x000000008003615c in ap_process_request (r=0x80270b00) at
http_request.c:249
#9  0x0000000080030ccc in ap_process_http_connection (c=0x802629d0) at
http_core.c:253
#10 0x0000000080055e4c in ap_run_process_connection (c=0x802629d0) at
connection.c:43
#11 0x00000000800476e4 in child_main (child_num_arg=<value optimized out>)
at prefork.c:610
#12 0x000000008004794e in make_child (s=0x800dca60, slot=0) at
prefork.c:650
#13 0x0000000080047a5a in startup_children (number_to_start=2) at
prefork.c:722
#14 0x00000000800483cc in ap_mpm_run (_pconf=<value optimized out>,
plog=<value optimized out>,
    s=0x800dca60) at prefork.c:941
#15 0x000000008004f02c in main (argc=<value optimized out>,
argv=0x3ffffbe02a8) at main.c:636
(gdb)


-- 
Edit bug report at http://bugs.php.net/?id=45769&edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=45769&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=45769&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=45769&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=45769&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=45769&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=45769&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=45769&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=45769&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=45769&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=45769&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=45769&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=45769&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=45769&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=45769&r=php4
Daylight Savings:             http://bugs.php.net/fix.php?id=45769&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=45769&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=45769&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=45769&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=45769&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=45769&r=mysqlcfg

Reply via email to