From: jaba at inbox dot lv
Operating system: Debian GNU/Linux
PHP version: 5.0.5
PHP Bug Type: MySQLi related
Bug description: mysqli_fetch_assoc crashes application
Description:
------------
I am developing on Windows XP but the application production version is
supposed to be on Debian. Seems like debian MySQLi is not working
properly. I can use mysqli_fetch_row or $result->fetch_row, but whenever I
use $result->fetch_assoc() or mysqli_fetch_assoc($result) on the same
result, the application crashes and I receive no output at all.
Reproduce code:
---------------
<?php
$mysqli = new mysqli("localhost", "vaipusr", "parolite", "vaipdb");
if (mysqli_connect_errno()) {
printf("Connect failed: %s\n", mysqli_connect_error());
exit();
}
$query = "SELECT * FROM acc_users";
if ($result = $mysqli->query($query)) {
while ($row = $result->fetch_assoc()) {
echo '<pre>';
print_r($row);
echo '</pre>';
}
$result->close();
}
$mysqli->close();
?>
Expected result:
----------------
string representation of associated arrays of table rows
Actual result:
--------------
nothing. application dies whenever you call mysqli_fetch_assoc
--
Edit bug report at http://bugs.php.net/?id=34515&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34515&r=trysnapshot4
Try a CVS snapshot (php5.0):
http://bugs.php.net/fix.php?id=34515&r=trysnapshot50
Try a CVS snapshot (php5.1):
http://bugs.php.net/fix.php?id=34515&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=34515&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=34515&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=34515&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=34515&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=34515&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=34515&r=support
Expected behavior: http://bugs.php.net/fix.php?id=34515&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=34515&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=34515&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=34515&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34515&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=34515&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=34515&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=34515&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=34515&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=34515&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=34515&r=mysqlcfg