Edit report at https://bugs.php.net/bug.php?id=55414&edit=1
ID: 55414
Comment by: lgandras at gmail dot com
Reported by: jbboehr at gmail dot com
Summary: Segmentation fault with
MySQLi_Result::fetch_fields()
Status: Feedback
Type: Bug
Package: MySQLi related
Operating System: CentOS release 5.6 (Final)
PHP Version: 5.3.6
Block user comment: N
Private report: N
New Comment:
Mysql Server 5.1.56-log
Linked against libmysql
Previous Comments:
------------------------------------------------------------------------
[2011-08-22 18:17:41] lgandras at gmail dot com
Hi,
sorry. We're not able to install till cpanel upgrades it's packages. This
usually takes a few weeks. I'm subscribed anyway and will update you as soon as
cpanel gets us a newer release.
------------------------------------------------------------------------
[2011-08-22 14:32:39] [email protected]
Hi
Does this happen with PHP 5.3.7, what MySQL server version are you using and
what MySQL client library is PHP linked against (libmysql or mysqlnd)?
------------------------------------------------------------------------
[2011-08-16 01:48:29] jbboehr at gmail dot com
PS Thanks for the gdb
------------------------------------------------------------------------
[2011-08-16 01:48:02] jbboehr at gmail dot com
@lgandras For now, we're just using a work-around case for MySQLi, maybe it'll
help you:
if( $adapter instanceof Zend_Db_Adapter_Mysqli ) {
// Fixes MySQLI segfault in fetch_fields() with SHOW ENGINES
$connection = $adapter->getConnection();
$result = mysqli_query($connection, 'SHOW ENGINES');
if ( !$result instanceof MySQLi_STMT ){
return $this->_error('badAdapter');
}
$data = array();
while ( $row = $result->fetch_array() ){
$data[] = $row;
}
} else {
try {
$data = $adapter->query('SHOW ENGINES')->fetchAll();
} catch( Exception $e ) {
return $this->_error('badAdapter');
}
}
------------------------------------------------------------------------
[2011-08-16 01:33:19] lgandras at gmail dot com
Hi,
Thank you so much. I was just posting my bug without a reproducible script
https://bugs.php.net/bug.php?id=55431. Here's your gdb =)
#0 0x0841f2e8 in add_property_string_ex (arg=0x907af64, key=0x87ad4cc
"catalog", key_len=8, str=0x31313230 <Address 0x31313230 out of bounds>,
duplicate=1)
at /home/cpeasyapache/src/php-5.3.6/Zend/zend_API.c:1524
#1 0x081d7628 in php_add_field_properties (value=0x907af64, field=0x90fc6e0)
at /home/cpeasyapache/src/php-5.3.6/ext/mysqli/mysqli_api.c:1056
#2 0x081d79b7 in zif_mysqli_fetch_fields (ht=0, return_value=0x907ae80,
return_value_ptr=0x0, this_ptr=0x907a9e8, return_value_used=0)
at /home/cpeasyapache/src/php-5.3.6/ext/mysqli/mysqli_api.c:1114
#3 0x0844632f in zend_do_fcall_common_helper_SPEC (execute_data=0x90a6e50) at
/home/cpeasyapache/src/php-5.3.6/Zend/zend_vm_execute.h:316
#4 0x08446f6b in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (execute_data=0x90a6e50)
at /home/cpeasyapache/src/php-5.3.6/Zend/zend_vm_execute.h:421
#5 0x084456fe in execute (op_array=0x90783f0) at
/home/cpeasyapache/src/php-5.3.6/Zend/zend_vm_execute.h:107
#6 0x08419b44 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at
/home/cpeasyapache/src/php-5.3.6/Zend/zend.c:1194
#7 0x083ad584 in php_execute_script (primary_file=0xbf8cbb04) at
/home/cpeasyapache/src/php-5.3.6/main/main.c:2268
#8 0x084e6f64 in main (argc=2, argv=0xbf8cbc64) at
/home/cpeasyapache/src/php-5.3.6/sapi/cli/php_cli.c:1193
I'm exactly in the same situation as you. I can't use PHP 5.3.6. This doesn't
seem to happen in PHP 5.3.5.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=55414
--
Edit this bug report at https://bugs.php.net/bug.php?id=55414&edit=1