From: jm dot barbier at solidev dot org
Operating system: Linux (Debian unstable)
PHP version: 5CVS-2004-01-09 (dev)
PHP Bug Type: MySQL related
Bug description: Segfault on mysql_pconnect
Description:
------------
<?php mysql_pconnect("localhost:/tmp/mysql.sock","xxx","xxx"); ?> gives
segfault; the same with mysql_connect = perfect...
CONFIG :
php5CVS-2004-01-09 running with apache2.0.48, mysql4.11
'./configure' '--prefix=/usr/local/testing/php5'
'--exec-prefix=/usr/local/testing/php5'
'--with-apxs2=/usr/local/testing/apache2/bin/apxs'
'--with-libxml-dir=/usr/local/testing/lib/' '--with-openssl'
'--with-mysql=/usr/local/testing/mysql'
'--with-mysqli=/usr/local/testing/mysql/bin/mysql_config' '--with-pear'
'--enable-debug'
Also tried with --with-sqlite, and without --enable-debug but no
difference...
All of this worked well with php5-b2 .
thank you...
Reproduce code:
---------------
bogus.php :
<?php mysql_pconnect("localhost:/tmp/mysql.sock","xxx","xxx"); ?>
>> php bogus.php
Expected result:
----------------
---
Actual result:
--------------
>gdb php
(gdb) run bogus.php
Starting program: /usr/bin/php bogus.php
[New Thread 16384 (LWP 23825)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 23825)]
0x081f2577 in zend_hash_apply (ht=0x83fd2d8,
apply_func=0x80cd840 <php_sqlite_callback_invalidator>,
tsrm_ls=0x8342fd8)
at /usr/local/src/php-src/Zend/zend_hash.c:658
658 if (apply_func(p->pData TSRMLS_CC)) {
(gdb) bt
#0 0x081f2577 in zend_hash_apply (ht=0x83fd2d8,
apply_func=0x80cd840 <php_sqlite_callback_invalidator>,
tsrm_ls=0x8342fd8)
at /usr/local/src/php-src/Zend/zend_hash.c:658
#1 0x080cdc0b in php_sqlite_forget_persistent_id_numbers (rsrc=0x83fd108,
tsrm_ls=0x8342fd8) at /usr/local/src/php-src/ext/sqlite/sqlite.c:374
#2 0x081f2580 in zend_hash_apply (ht=0x8346cd4,
apply_func=0x80cdbd0 <php_sqlite_forget_persistent_id_numbers>,
tsrm_ls=0x8342fd8) at /usr/local/src/php-src/Zend/zend_hash.c:658
#3 0x080cdca0 in zm_deactivate_sqlite (type=1, module_number=4,
tsrm_ls=0x28d)
at /usr/local/src/php-src/ext/sqlite/sqlite.c:390
#4 0x081eea00 in module_registry_cleanup (module=0x28d,
tsrm_ls=0x8342fd8)
at /usr/local/src/php-src/Zend/zend_API.c:1411
#5 0x081f2580 in zend_hash_apply (ht=0x8342040,
apply_func=0x81ee9c0 <module_registry_cleanup>, tsrm_ls=0x8342fd8)
at /usr/local/src/php-src/Zend/zend_hash.c:658
#6 0x081e9bbf in zend_deactivate_modules (tsrm_ls=0x8342fd8)
at /usr/local/src/php-src/Zend/zend.c:797
#7 0x081a28dd in php_request_shutdown (dummy=0x0)
at /usr/local/src/php-src/main/main.c:1228
#8 0x0821de65 in main (argc=2, argv=0xbffffb34)
at /usr/local/src/php-src/sapi/cli/php_cli.c:1028
(gdb)
--
Edit bug report at http://bugs.php.net/?id=26852&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26852&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26852&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=26852&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=26852&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=26852&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=26852&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=26852&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=26852&r=support
Expected behavior: http://bugs.php.net/fix.php?id=26852&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=26852&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=26852&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=26852&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26852&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=26852&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=26852&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=26852&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26852&r=float