RE: Weird Segfaults with Oracle, PHP, Apache2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




I went through and generated a core file with php cgi and my test file.

Here's the gdb output.. It's failing on the Oracle library... Anyone know
where to look next?


[jharris@austispgwy01 gsi]$ gdb /usr/local/bin/php core.843 
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"...
Core was generated by `php ora.php'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libcrypt.so.1...done.
Loaded symbols for /lib/libcrypt.so.1
Reading symbols from /lib/libssl.so.2...done.
Loaded symbols for /lib/libssl.so.2
Reading symbols from /lib/libcrypto.so.2...done.
Loaded symbols for /lib/libcrypto.so.2
Reading symbols from /lib/libresolv.so.2...done.
Loaded symbols for /lib/libresolv.so.2
Reading symbols from /lib/libm.so.6...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/libnsl.so.1...done.
Loaded symbols for /lib/libnsl.so.1
Reading symbols from /opt/oracle/OraHome1/lib/libclntsh.so.9.0...done.
Loaded symbols for /opt/oracle/OraHome1/lib/libclntsh.so.9.0
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /opt/oracle/OraHome1/lib/libwtc9.so...done.
Loaded symbols for /opt/oracle/OraHome1/lib/libwtc9.so
Reading symbols from /lib/libpthread.so.0...done.
Loaded symbols for /lib/libpthread.so.0
#0  0x407a5582 in sskgmstat () from
/opt/oracle/OraHome1/lib/libclntsh.so.9.0




-----Original Message-----
From: Harris, Jeff 
Sent: Tuesday, July 08, 2003 5:52 PM
To: 'php-db@lists.php.net'
Subject: Weird Segfaults with Oracle, PHP, Apache2



We're getting segfaults (11) when we try and execute a simple piece of
Oracle PHP code. This is a new installation and compilation of Apache2 and
we're just trying to see what is wrong. This particular code works on all of
our Apache 1.3 installations.

Versions: Redhat 8.0, PHP version 4.3.2, Apache version 2.0.46, Oracle
version 9i 9.2.0.1.0

We've worked through all of the oracle user issues with Apache, made sure
and set ORACLE_HOME and TNS_ADMIN.

the code we're executing is:

<?php

echo 'here';
$conn = OCILogon("scott","tiger","db");
echo 'here2';

$stmt = OCIParse($conn, "select original_system_reference, attribute8 from
apps.so_headers_interface_all where error_flag = 'Y'");

echo 'here3';

OCIDefineByName($stmt, "ORIGINAL_SYSTEM_REFERENCE", &$order_number);
OCIDefineByName($stmt, "ATTRIBUTE8", &$attribute8);

OCIExecute($stmt);
echo 'here4';

while (OCIFetch($stmt)) {
echo 'here5';
  echo $order_number."    ";
  echo ": ".$attribute8."<br>";
}

echo 'here6';
  echo $order_number."    ";
OCIFreeStatement($stmt);
OCILogoff($conn);
echo 'here7';
?>



The server segfaults right after it gets to "here3". If you comment out
everything after here3, the page works fine. Running the $stmt select works
fine if you use sqlplus. I'm not sure why it's dying.


Has anyone seen anything like this?



---

Jeff Harris - Network Engineer
Golfsmith International, Inc.
CCNP, CCNA


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux