php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #23126 MySQL v4.x crashes PHP in CGI/Apache mode
Submitted: 2003-04-09 04:23 UTC Modified: 2003-04-30 06:29 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: cmouse at quakenet dot org Assigned:
Status: Not a bug Package: MySQL related
PHP Version: 4.3.2RC1 OS: linux-2.4.19-grsec
Private report: No CVE-ID: None
 [2003-04-09 04:23 UTC] cmouse at quakenet dot org
Apparently for some reason, using the new MySQL v4.x libmysqlclient crashes PHP in both CGI and Apache mode. The problem is fixed by using the bundled library that comes with PHP or using a libmysqlclient prior v4. I haven't been able to establish what exactly causes the crash, since it only happens in phpMyAdmin in sql.php and only when doing 'SELECT' queries. Anything else succeeds. 

I am unable to provide any gdb backtraces or such since I haven't been able to get a usable backtrace, despite my best efforts, but my best guess is that it fails on dlopen() on the mysql library. For some odd reason. 

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-04-09 05:43 UTC] sniper@php.net
What was the used configure lines for both mysql and php ?

 [2003-04-09 22:34 UTC] cmouse at quakenet dot org
PHP:
./configure --prefix=/usr --with-apxs=/usr/bin/apxs --enable-inline-optimization --with-mysql=/usr --enable-bcmath --enable-calendar --enable-dba --enable-dbase --enable-dbx --enable-dio --enable-exif --enable-ftp --enable-gd-native-ttf --enable-mime-magic --enable-shmop --enable-sockets --enable-sysvmsg --enable-sysvsem --enable-sysvshm --with-config-file-path=/etc/php4/apache --with-zlib --with-bz2 --with-dom --with-gd=/usr --with-jpeg --with-png-dir=/usr --with-zlib-dir=/usr --with-t1lib=/usr --with-iconv=/usr --with-java=/opt/j2sdk1.4.1_01 --with-ldap=/usr --with-mcal=/usr --with-mcrypt=/usr --with-mhash=/usr --with-recode=/usr --with-mm=/usr --with-gdbm=/usr --with-imap=/usr/src/pine4.53/c-client -with-imap-ssl=/usr/ssl 

MySQL:
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --mandir=/usr/share/man --enable-thread-safe-client --enable-assembler --with-pthread --with-libwrap=/usr --with-openssl
 [2003-04-09 22:35 UTC] cmouse at quakenet dot org
Forgot. I used gcc-3.2.2 to compile both of them.
 [2003-04-24 04:24 UTC] georg@php.net
Please be more specific. MySQL 4.x ? that could be MySQL 4.0 or MySQL 4.1 which are totally diffrent.
 [2003-04-24 05:54 UTC] cmouse at quakenet dot org
$ mysql -V
mysql  Ver 12.18 Distrib 4.0.12, for pc-linux (i686)
 [2003-04-28 09:50 UTC] sniper@php.net
First of all, get the binary distribution of mysql and try with it. Also try downgrade your gcc to 2.95.x series.

 [2003-04-29 00:23 UTC] cmouse at quakenet dot org
Ok. Can you explain WHY I should break my system and do all these things you told me to do. I can't use the 'binary distribution' on MySQL due certain system limitations.
 [2003-04-30 06:29 UTC] sniper@php.net
Does not crash here -> user error.

 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Tue Oct 06 11:00:02 2026 UTC