php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #3842 Apache segfaults IFF mysql support is compiled in
Submitted: 2000-03-15 20:53 UTC Modified: 2000-03-20 02:12 UTC
From: vorlon at netexpress dot net Assigned:
Status: Closed Package: MySQL related
PHP Version: 3.0.15 OS: RH Linux 6.1 / kernel 2.2.13 / g
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: vorlon at netexpress dot net
New email:
PHP Version: OS:

 

 [2000-03-15 20:53 UTC] vorlon at netexpress dot net
With newer versions of MySQL (>=3.22.32), Apache segfaults on startup.  I'm using the i386 RPMs available for download from the mysql site, with no modifications; Apache has undergone a number of site modifications, including SSL and frontpage support, but reversing these patches has no impact on the crash.

gdb backtrace (generated using 'gdb /usr/sbin/httpd core'  on the output of 'httpd -X'):

#0  0x4049a404 in _init () from /lib/libpthread.so.0
(gdb) bt
#0  0x4049a404 in _init () from /lib/libpthread.so.0
#1  0x805a32c in make_sock ()
#2  0x805a691 in setup_listeners ()
#3  0x805b3c7 in standalone_main ()
#4  0x805ba7f in main ()
#5  0x400b71eb in __libc_start_main (main=0x805b7f8 <main>, argc=2,
    argv=0xbffff914, init=0x804efd0 <_init>, fini=0x8079a0c <_fini>,
    rtld_fini=0x4000a610 <_dl_fini>, stack_end=0xbffff90c)
    at ../sysdeps/generic/libc-start.c:90
(gdb) 


Configure options to php:
CFLAGS="-fPIC" ./configure --prefix=/usr --with-apxs=/usr/sbin/apxs \
        --with-config-file-path=/etc/httpd --enable-safe-mode \
        --with-exec-dir=/usr/bin --with-system-regex  --disable-debug \
        --with-zlib --with-gd --with-mysql --enable-sysvshm \
        --enable-sysvsem --with-freetype --with-snmp \
        --enable-magic-quotes

If '--with-mysql' is removed from the list of options, the segfaults disappear.  If other options are removed (notably --with-freetype and --with-snmp), no change is noted.

Previously, I had successfully compiled php on this machine using mysql 3.21; no abberant behavior was noted at the time.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-03-16 09:59 UTC] joey at cvs dot php dot net
User also reported (to the list):

Follow-up:  in addition, this problem seems to only occur with the shared
version of the libmysqlclient library; compiling php against the static
library seems to eliminate the segfault.
 [2000-03-20 02:12 UTC] rasmus at cvs dot php dot net
Since this only happens with the .so version (which is linked against pthreads, I think) and the backtrace doesn't touch any PHP code, I'd say that this is not a PHP bug.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jun 03 02:01:26 2025 UTC