Bug #55414 [NEW]: Segmentation fault with MySQLi_Result::fetch_fields()
| From: | jbboehr at gmail dot com | Date: | Sat, 13 Aug 2011 00:37:28 +0000 |
| Subject: | Bug #55414 [NEW]: Segmentation fault with MySQLi_Result::fetch_fields() | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-162553@lists.php.net to get a copy of this message | ||
From:
Operating system: CentOS release 5.6 (Final)
PHP version: 5.3.6
Package: MySQLi related
Bug Type: Bug
Bug description:Segmentation fault with MySQLi_Result::fetch_fields()
Description:
------------
A segmentation fault is occurring for us when the following is done:
-Run SHOW ENGINES as a prepared statement
-Call MySQLi_STMT::fetch_metadata()
-Call MySQLi_Result::fetch_fields() on the result.
This is using the Zend Framework (Zend_Db_Adapter_Mysql), however the test
script below successfully replicated the segfault.
We have had at least 30 people with the issue (we sell a PHP script), out
of
maybe a thousand or so.
Unfortunately, this isn't my server, so I can't include a backtrace. Here
is
someone else having a similar problem with SHOW CREATE TABLE:
http://stackoverflow.com/questions/6769515/php-programming-seg-fault
PHP Version => 5.3.6
Configure Command => './configure' '--disable-fileinfo'
'--enable-bcmath'
'--
enable-calendar' '--enable-exif' '--enable-ftp'
'--enable-gd-native-ttf'
'--
enable-libxml' '--enable-magic-quotes' '--enable-mbstring'
'--enable-pdo=shared'
'--enable-sockets' '--enable-zend-multibyte' '--enable-zip' '--
prefix=/usr/local' '--with-apxs2=/usr/local/apache/bin/apxs' '--with-bz2'
'--
with-curl=/opt/curlssl/' '--with-curlwrappers' '--with-freetype-dir=/usr'
'--
with-gd' '--with-gettext' '--with-imap=/opt/php_with_imap_client/'
'--with-imap-
ssl=/usr' '--with-jpeg-dir=/usr' '--with-kerberos'
'--with-libdir=lib64'
'--
with-libexpat-dir=/usr' '--with-libxml-dir=/opt/xml2/' '--with-
mcrypt=/opt/libmcrypt/' '--with-mm=/opt/mm/' '--with-mysql=/usr'
'--with-mysql-
sock=/var/lib/mysql/mysql.sock' '--with-mysqli=/usr/bin/mysql_config'
'--with-
openssl=/usr' '--with-openssl-dir=/usr' '--with-pcre-regex=/opt/pcre'
'--with-
pdo-mysql=shared' '--with-pdo-sqlite=shared' '--with-pic'
'--with-png-dir=/usr'
'--with-pspell' '--with-sqlite=shared' '--with-tidy=/opt/tidy/'
'--with-xmlrpc'
'--with-xpm-dir=/usr' '--with-xsl=/opt/xslt/' '--with-zlib'
'--with-zlib-
dir=/usr'
mysqli
MysqlI Support => enabled
Client API library version => 5.0.92
Active Persistent Links => 0
Inactive Persistent Links => 0
Active Links => 0
Client API header version => 5.0.92
MYSQLI_SOCKET => /var/lib/mysql/mysql.sock
Directive => Local Value => Master Value
mysqli.allow_local_infile => On => On
mysqli.allow_persistent => On => On
mysqli.default_host => no value => no value
mysqli.default_port => 3306 => 3306
mysqli.default_pw => no value => no value
mysqli.default_socket => /var/lib/mysql/mysql.sock =>
/var/lib/mysql/mysql.sock
mysqli.default_user => no value => no value
mysqli.max_links => Unlimited => Unlimited
mysqli.max_persistent => Unlimited => Unlimited
mysqli.reconnect => Off => Off
+-----------------------------------------+-------------------------------------
-------------+
| Variable_name | Value
|
+-----------------------------------------+-------------------------------------
-------------+
| version | 5.0.92-community
|
| version_comment | MySQL Community Edition (GPL)
|
+-----------------------------------------+-------------------------------------
-------------+
Linux ***** 2.6.18-***** #1 SMP Wed Jan 5 17:52:25 EST 2011 x86_64 x86_64
x86_64
GNU/Linux
Test script:
---------------
$mysqli = new mysqli($host, $username, $password, $dbname);
$stmt = $mysqli->prepare('SHOW ENGINES');
$stmt->execute();
$stmt->bind_result($engine, $support, $comment);
$meta = $stmt->result_metadata();
$meta->fetch_fields();
$stmt->close();
$mysqli->close();
--
Edit bug report at https://bugs.php.net/bug.php?id=55414&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=55414&r=trysnapshot54
Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=55414&r=trysnapshot53
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=55414&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=55414&r=fixed
Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=55414&r=needdocs
Fixed in release: https://bugs.php.net/fix.php?id=55414&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=55414&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=55414&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=55414&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=55414&r=support
Expected behavior: https://bugs.php.net/fix.php?id=55414&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=55414&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=55414&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=55414&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=55414&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=55414&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=55414&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=55414&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=55414&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=55414&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=55414&r=mysqlcfg