Bug #1338 PHP5 -> Segmentation fault
Submitted: 18 Sep 2003 11:01 Modified: 8 Dec 2003 13:32
Reporter: [ name withheld ] Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.0.15 OS:Linux (Debian Woody)
Assigned to: CPU Architecture:Any

[18 Sep 2003 11:01] [ name withheld ]
Description:
Hi,

I've serioius problems getting php5(beta1 and various CVS builds) to connect to the mysql server. At first i suspected PHP - but the php-guys told me it's a mysql bug. (See: http://bugs.php.net/bug.php?id=25400)
The Problem is reproduceable with Debian Woody using the MySQL Binaries (4.0.14&4.0.15) and/or a self compiled version of Mysql.

Please have a look at my php Bug report and tell me if I can do anything to ether get it running or do more investigation.

Yours,
  Stephan

How to repeat:
Install Debian/Woody, Apache 2.0.47 (not even necessary - problem also occours with cli/php), MySQL 4.0.15 Binaries or Source with default options as provided in the MySQL Documentation and PHP5beta1 od any CVS Build.
Tested on:
K6-2, PIII, AthlonXP, ...
[5 Dec 2003 2:41] Alexander Keremidarski
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.

Hello,
What is the status of this bug?

The last comment on http://bugs.php.net/bug.php?id=25400 says this is not reproducible.

[21 Sep 9:08am EDT] hrmn at gmx dot de

 ... I run 4.0.15 under php4 and php5 without any problem. 

Can you still reproduce it with 4.0.16?
[5 Dec 2003 4:48] Georg Richter
I wasn't able to reproduce this bug too (Tested on Suse and Debian Sage with PHP4+PHP5, MySQL 4.0.16 and 4.1.1)

Probably you should try to update your Debian installation. It looks like this crash only occurs on Debian Woody (see http://bugs.php.net/bug.php?id=16836 and http://bugs.php.net/bug.php?id=25400)
[5 Dec 2003 6:47] [ name withheld ]
Hi,

I was able to reproduce this Bug with Debian/Woody an php5.0.0b1 several times. I tried the Debian Packages as well as a self compiled 4.0.16. Since I got no helpful replies I upgraded my Woody to Sarge. Since then no more Problems.
In my opinion this bug still exists but since I'm no longer confonted with it I leave it up to you if you close it or not.

yours
 stephan
[8 Dec 2003 13:32] Alexander Keremidarski
After reading carefully Bug reports at 
http://bugs.php.net/bug.php?id=25400
and
http://bugs.php.net/bug.php?id=16836
and with regard of the fact that Debian packages are not build by MySQL AB I believe this issue can't be considered MySQL bug.

If same crash can be repeated with MySQL binary distribution which is statically linked this bug report can be reopened.
[19 Jan 2004 23:14] berto
I believe I have experienced this bug using Debian/Sarge and MySQL's binary packages.

I unpackaged MySQL 4.0.17 to: /usr/local/mysql-standard-4.0.17-pc-linux-i686 and symlinked it to /usr/local/mysql.  From there I followed the installation instructions and then compiled apache using:

./configure --prefix=/opt/apps/httpd/2.0.48 --enable-dav --enable-dav-fs --enable-so --enable-alias --enable-rewrite

and PHP using:

./configure --prefix=/opt/apps/php/4.3.4 --with-mysql=/usr/local/mysql --with-mysql-sock=/tmp/mysqld.sock --with-apxs2=/opt/apps/httpd/2.0.48/bin/apxs --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-tiff-dir --with-zlib-dir --with-expat-dir=/opt/apps/expat/1.95.7 --with-xslt-sablot=/opt/apps/sablotron/1.0.1 --enable-xslt=shared --enable-track-vars --with-gettext --with-curl=/opt/apps/curl/7.10.8 --with-xml --with-dom --with-iconv-dir=/opt/apps/libiconv/1.9.1 --with-iconv=/opt/apps/libiconv/1.9.1 --with-db4=/opt/apps/db/4.0.14 --enable-debug

I opened up a PHP bug at:

http://bugs.php.net/bug.php?id=26929

They referenced me to this bug, which is when I upgraded Debian from Stable to Testing.  For that, I edited my /etc/apt/sources.list and ran apt-get update && apt-get dist-upgrade.  After the system was upgraded, i recompiled everything i compiled myself and still saw the same exact problem.

Any help is much appreciated!  Thanks.
[25 Apr 2004 4:33] Guilherme Monteiro
I have the same problem but with php 4.3.6, apache 2.0.49  and mysql 4.0.18. OS is Debian Woody.

Php was configured with:
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql

I tried tests with same results (segmentation fault) with mysql binary dist and compiling mysql from sources. Php was recompiled at each mysql change.
[25 Apr 2004 4:59] Guilherme Monteiro
The problem was solved removing any "db" reference at /etc/nsswitch.conf. Now it looks like:

passwd:         compat
group:          compat
shadow:         compat
hosts:          files dns
networks:       files
protocols:      files
services:       files
ethers:         files
rpc:            files
netgroup:       nis

Hope this helps! Now it's working perfectly.