#20840 [NEW]: Command line mysql_connect Segmentation fault

From: Date: Thu, 05 Dec 2002 22:10:27 +0000
Subject: #20840 [NEW]: Command line mysql_connect Segmentation fault
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-26793@lists.php.net to get a copy of this message
From: rb512c@motorola.com Operating system: Solaris 8 PHP version: 4.2.3 PHP Bug Type: Reproducible crash Bug description: Command line mysql_connect Segmentation fault I have a new machine (ultra 60 solaris 8) that is running php 4.2.3 and mysql 3.23.52. If I run a simple mysql_connect to the database through apache (web page) it works just fine. But if I run the same file with the command line php, I get a: Segmentation Fault(coredump) If I gdb the core file I find that it failed in read_charset_index () (gdb) bt #0 0xf535c in read_charset_index () #1 0xf5d08 in get_charset () #2 0xee7cc in mysql_real_connect () #3 0x4383c in php_mysql_do_connect (ht=2008792, return_value=0x1e1bd8, this_ptr=0x0, return_value_used=0, persistent=0) at php_mysql.c:684 #4 0x439e4 in zif_mysql_connect (ht=3, return_value=0x1e1bd8, this_ptr=0x0, return_value_used=1) at php_mysql.c:736 #5 0xe6f4c in execute () #6 0xc820c in zend_execute_scripts (type=8, retval=0x0, file_count=3) at zend.c:812 #7 0x2f2f0 in php_execute_script (primary_file=0xffbef3d0) at main.c:1383 #8 0x2c7f0 in main (argc=2, argv=0xffbef45c) at cgi_main.c:778 (gdb) If I truss the program, I see the same thing: open64("/usr/local/mysql/share/mysql/charsets/Index", O_RDONLY) = 6 Incurred fault #6, FLTBOUNDS %pc = 0x000F535C siginfo: SIGSEGV SEGV_MAPERR addr=0x00000008 Received signal #11, SIGSEGV [default] siginfo: SIGSEGV SEGV_MAPERR addr=0x00000008 *** process killed *** -- Edit bug report at http://bugs.php.net/?id=20840&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=20840&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=20840&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=20840&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=20840&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=20840&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=20840&r=support Expected behavior: http://bugs.php.net/fix.php?id=20840&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=20840&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=20840&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=20840&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=20840&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=20840&r=dst IIS Stability: http://bugs.php.net/fix.php?id=20840&r=isapi

« previous php.bugs (#26793) next »