ID: 44867 Comment by: wcshields at gmail dot com Reported By: jesuslarag at gmail dot com Status: No Feedback Bug Type: MySQLi related Operating System: Linux Debian etch PHP Version: 5.2.6RC5 New Comment:
$ mysql --version mysql Ver 14.12 Distrib 5.0.51a, for debian-linux-gnu (i486) using readline 5.2 $ php --version PHP 5.2.4 (cli) (built: Dec 8 2008 15:08:11) (DEBUG) Copyright (c) 1997-2007 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies $ uname -a Linux xxxx 2.6.24-16-server #1 SMP Thu Apr 10 13:58:00 UTC 2008 i686 GNU/Linux $ ./configure --with-mysqli --enable-debug $ make $ cd sapi/cli $ ./php <? $bplanid = 17; $conn = new mysqli('localhost', 'user', 'password', 'db'); $stmt = $conn->prepare("SELECT name, longtext1 FROM sampletable"); $stmt->execute(); $stmt->bind_result($name, $value); $count = 1; while ($stmt->fetch()) { $size = sizeof($value); echo "$name $size\n"; $count++; } $stmt->close(); ?> ^D ... Segmentation fault. $ gdb php core GNU gdb 6.8-debian Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i486-linux-gnu"... Cannot access memory at address 0x104 (gdb) bt #0 0xb7062945 in ?? () #1 0x082f910b in php_tcp_sockop_connect (stream=0xbfa6f894, sock=0x6, xparam=0xbfa6f860) at /home/wshields/src/php5-5.2.4/main/streams/xp_socket.c:652 #2 0x082e8b18 in php_stream_fill_read_buffer (stream=0x873dc7c, size=141810744) at /home/wshields/src/php5-5.2.4/main/streams/streams.c:532 #3 0x082c7623 in _start_element_handler_ns (user=0x8, name=0x0, prefix=0x3 <Address 0x3 out of bounds>, URI=0x0, nb_namespaces=-1079566612, namespaces=0x0, nb_attributes=2, nb_defaulted=543584032, attributes=0x2d6c6c00) at /home/wshields/src/php5-5.2.4/ext/xml/compat.c:107 #4 0x0827d000 in php_implode (delim=0x1, arr=0x0, return_value=0x5bbef9ee) at /home/wshields/src/php5-5.2.4/ext/standard/string.c:954 #5 0x0835c044 in ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_VAR_HANDLER ( execute_data=0xb7fd2ce0) at /home/wshields/src/php5-5.2.4/Zend/zend_vm_execute.h:6273 #6 0xb79d4450 in ?? () #7 0x080982c1 in compile_regex (options=Cannot access memory at address 0x8 ) at /home/wshields/src/php5-5.2.4/ext/pcre/pcrelib/pcre_compile.c:5118 Backtrace stopped: previous frame inner to this frame (corrupt stack?) (gdb) This is repeatable and predicatble. Longtext columns simply don't work with PHP/Mysql. This has been reported going back to at least 2005. Can somoene PLEASE actually fix this?? Previous Comments: ------------------------------------------------------------------------ [2008-05-08 01:00:00] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". ------------------------------------------------------------------------ [2008-04-30 08:47:21] [EMAIL PROTECTED] Thank you for this bug report. To properly diagnose the problem, we need a backtrace to see what is happening behind the scenes. To find out how to generate a backtrace, please read http://bugs.php.net/bugs-generating-backtrace.php for *NIX and http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32 Once you have generated a backtrace, please submit it to this bug report and change the status back to "Open". Thank you for helping us make PHP better. ------------------------------------------------------------------------ [2008-04-30 08:30:23] jesuslarag at gmail dot com Description: ------------ i try to compile php 5.2.3, 5.2.5 and 5.2.6rc5 my configure: ./configure \ --prefix=/usr/php --sysconfdir=/etc/php5/apache2 --mandir=/usr/share/man \ --with-apxs2=/usr/sbin/apxs \ --libexecdir=/usr/lib/php5 --bindir=/usr/bin --libdir=/usr/lib/php5 \ --with-config-file-path=/etc/php5/apache2 --with-config-file-scan-dir=/etc/php5/conf.d \ --with-exec-dir=/usr/lib/php5/libexec --with-pear=/usr/share/php \ --enable-shared --with-gnu-ld --disable-inline-optimization \ --with-gd --disable-cgi --disable-ipv6 \ --disable-debug --with-curl --with-curlwrappers \ --enable-zip --with-bz2 --with-zlib \ --enable-bcmath --enable-calendar --enable-mbstring \ --with-libxml-dir=/usr --with-regex \ --with-pcre-regex=/usr --enable-exif --with-t1lib --with-xsl \ --with-mhash --with-mcrypt --enable-zend-multibyte \ --with-pspell --with-openssl --enable-sockets \ --enable-soap --enable-ftp --with-gd --with-ttf \ --enable-json --with-tidy --with-iconv --with-gettext \ --enable-gd-native-ttf --enable-gd-jis-conv --with-xmlrpc \ --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-sigchild \ --with-ldap --with-pgsql --with-sqlite \ --enable-pdo --with-pdo-mysql --with-pdo-sqlite \ --with-mysql --with-mysql-sock=/var/run/mysqld/mysqld.sock \ --with-mysqli=shared --with-mysqli=/usr/mysql/bin/mysql_config This sentence work in debian lenny and fedora core with mysql 5.1 (32bits) my system: Debian Etch (amd64) mySQL 5.1 But any application fails with a segmentation fault. It's not a problem with php5 classes, because wordpress 2.3 and joomla 1.4 also fail. when i remove --with-mysqli, failures do not occur Reproduce code: --------------- Any code with mysql/mysqli crash with this error: [notice] child pid 20330 exit signal Segmentation fault (11) optional, this error appears with --enable-debug: zend_mm_heap corrupted Run Wordpress, Joomla or any database application with mysql/mysqli. Actual result: -------------- In Debian Etch (64bits) any application that use mysql/mysqli crash with this error: zend_mm_heap corrupted and a signal segmentation fault (11) [notice] child pid 20330 exit signal Segmentation fault (11) with --enable-debug; dmesg returns: apache2[12415] general protection rip:2ad199d719cc rsp:417f6ba0 error:0 apache2[12492]: segfault at 0000000001b2c738 rip 00002ad19d60431f rsp 0000000040ff6f90 error 4 apache2[3586]: segfault at 0000000001b2c738 rip 00002ad19d60431f rsp 0000000040ff6f90 error 4 apache2[3583] trap stack segment rip:43b64a rsp:41000f00 error:0 apache2[3637] trap stack segment rip:43b64a rsp:41000f00 error:0 apache2[17782]: segfault at 00002ad19d1db000 rip 00002ad19d1db047 rsp 00007fff12579c88 error 7 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=44867&edit=1