From: bjorn dot malmberg at gmail dot com
Operating system: Debian Sarge 3.1
PHP version: 4.4.0
PHP Bug Type: MySQL related
Bug description: PHP segfaults when connecting to MySQL
Description:
------------
PHP segfaults on my Debian 3.1 machine when trying to connect to MySQL.
MySQL version: 4.1.13-standard
Apache version: 1.3.31
PHP version: 4.4.0
PHP configline:
./configure --with-mysql=/usr/local/mysql --enable-track-vars
--enable-xslt --with-xslt-sablot --enable-mbstring
--with-apxs=/etc/apache/bin/apxs --with-gettext=/usr/bin --enable-sockets
--with-gd --with-jpeg-dir=/usr/lib --with-zlib-dir=/usr/include
--with-imagick --enable-exif --enable-sockets --enable-posix --with-iconv
Backtrace:
#0 0x4010139b in mallopt () from /lib/libc.so.6
#1 0x4010015f in free () from /lib/libc.so.6
#2 0x4033179c in _efree (ptr=0x812ec1c) at
/usr/src/php/php-4.4.0/Zend/zend_alloc.c:265
#3 0x40290e27 in _close_mysql_link (rsrc=0x812f344) at
/usr/src/php/php-4.4.0/ext/mysql/php_mysql.c:297
#4 0x40343434 in list_entry_destructor (ptr=0x812f344) at
/usr/src/php/php-4.4.0/Zend/zend_list.c:177
#5 0x403423c9 in zend_hash_apply_deleter (ht=0x40632680, p=0x812a73c) at
/usr/src/php/php-4.4.0/Zend/zend_hash.c:611
#6 0x403424ef in zend_hash_graceful_reverse_destroy (ht=0x40632680) at
/usr/src/php/php-4.4.0/Zend/zend_hash.c:677
#7 0x40343535 in zend_destroy_rsrc_list (ht=0x40632680) at
/usr/src/php/php-4.4.0/Zend/zend_list.c:233
#8 0x40336d93 in shutdown_executor () at
/usr/src/php/php-4.4.0/Zend/zend_execute_API.c:211
#9 0x4033e5cd in zend_deactivate () at
/usr/src/php/php-4.4.0/Zend/zend.c:693
#10 0x40319085 in php_request_shutdown (dummy=0x0) at
/usr/src/php/php-4.4.0/main/main.c:997
#11 0x40356475 in apache_php_module_main (r=0x8125b6c,
display_source_mode=0)
at /usr/src/php/php-4.4.0/sapi/apache/sapi_apache.c:60
#12 0x40356e02 in send_php (r=0x8125b6c, display_source_mode=0,
filename=0x0)
at /usr/src/php/php-4.4.0/sapi/apache/mod_php4.c:627
#13 0x40356e51 in send_parsed_php (r=0x8125b6c) at
/usr/src/php/php-4.4.0/sapi/apache/mod_php4.c:642
#14 0x0807aad9 in ap_invoke_handler ()
#15 0x080912bc in process_request_internal ()
#16 0x08091326 in ap_process_request ()
#17 0x080879a0 in child_main ()
#18 0x08087b51 in make_child ()
#19 0x08087ccc in startup_children ()
#20 0x080883ed in standalone_main ()
#21 0x08088c5c in main ()
I guess this means that PHP doesn't like the version of libc that Sarge is
using huh?
Reproduce code:
---------------
<?php
$link = mysql_connect('localhost', 'root', '');
?>
--
Edit bug report at http://bugs.php.net/?id=34012&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34012&r=trysnapshot4
Try a CVS snapshot (php5.0):
http://bugs.php.net/fix.php?id=34012&r=trysnapshot50
Try a CVS snapshot (php5.1):
http://bugs.php.net/fix.php?id=34012&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=34012&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=34012&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=34012&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=34012&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=34012&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=34012&r=support
Expected behavior: http://bugs.php.net/fix.php?id=34012&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=34012&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=34012&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=34012&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34012&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=34012&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=34012&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=34012&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=34012&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=34012&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=34012&r=mysqlcfg