ID: 19456
Updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
-Status: Open
+Status: Feedback
-Bug Type: Reproducible crash
+Bug Type: ODBC related
Operating System: Redhat Linux
PHP Version: 4.2.3
New Comment:
1) Turn on your SQL Logging feature (it will require editing your
odbc.ini). Add the results of said CONNECT logging to the bug report
if you can.
2) Please post a backtrace of the segfault, it will help. Honest. :)
Also moving this over to ODBC
Previous Comments:
------------------------------------------------------------------------
[2002-09-17 13:26:42] [EMAIL PROTECTED]
I just recompiled PHP 4.0.6 with all the same options and ODBC works
there. So this seems to be unique to 4.2.x.
I noticed that I had an old version of apxs is /usr/sbin/apxs (which
shouldn't have mattered since I designated the correct apxs in my
configure script). Unfortunately, after changing that I still get the
same problem. So that's not it.
------------------------------------------------------------------------
[2002-09-17 12:37:40] [EMAIL PROTECTED]
I've been running PHP 4.2.1 for some time on a test machine with the
following configure options:
'./configure' \
'--with-apxs' \
'--with-ibm-db2=shared' \
'--with-ldap=shared' \
'--with-mcrypt=shared' \
'--with-mhash=shared' \
'--enable-ftp' \
'--with-config-file-path=/etc' \
'--enable-trans-sid' \
'--enable-debug' \
'--with-png-dir=/usr/local' \
'--with-jpeg-dir=/usr/local' \
'--with-zlib=/usr/local' \
'--with-gd=/usr/local' \
Worked fine under Apache 1.3.20. Then I started doing some upgrades,
upgrading Apache to 1.3.26 and OpenSSL to 0.9.6g. At this point, PHP
stopped working, generating a segfault (11) in my Apache log every time
an ODBC function was called. The following script would exhibit this
behavior:
<?php
$dbconn = odbc_connect(<dsn>,<user>,<password>);
?>
I was unable to get PHP to segfault with scripts that did not use ODBC
functions.
I then recompiled PHP as a CGI function to get a backtrace, which gives
me this:
#0 0x407173ac in ?? ()
#1 0x40117780 in __libc_start_main () from /lib/libc.so.6
I also stepped through the code while running the script given above.
PHP appears to complete processing entirely, but segfaults when
exiting. The exit_status variable was 0.
I then stepped through the code while running a script with no odbc
code:
<?php print("Test!\n"); ?>
This appears to complete exactly the same way the ODBC script did, with
an exit_status of 0, but it does not segfault.
Note that I've also upgraded to PHP 4.2.3 and I get the exact same
problem. Here is a summary of my relevant versions:
Linux Kernel 2.2.16
Apache 1.3.26
OpenSSL 0.9.6g
mod_ssl 2.8.10-1.3.26
PHP 4.2.3
libc 2.2.3
Please let me know if I can supply any additional information.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=19456&edit=1