#35753 [NEW]: mysql_fetch_field + mysql 5.0.17 crashes PHP
| From: | reweiner at yahoo dot com | Date: | Tue, 20 Dec 2005 23:49:42 +0000 |
| Subject: | #35753 [NEW]: mysql_fetch_field + mysql 5.0.17 crashes PHP | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-90766@lists.php.net to get a copy of this message | ||
From: reweiner at yahoo dot com
Operating system: RedHat AS 3.0
PHP version: 5.1.1
PHP Bug Type: MySQL related
Bug description: mysql_fetch_field + mysql 5.0.17 crashes PHP
Description:
------------
Compiling php 5.1.1 on a machine that has mysql 5.0.17 installed crashes
when calling mysql_fetch_field
Reproduce code:
---------------
<?php
$conn = mysql_connect(....,....,....) or mysql_die();
mysql_select_db("teste", $conn);
$result = mysql_query('select * from teste');
/* get column metadata */
$i = 0;
while ($i < mysql_num_fields($result)) {
echo "Information for column $i:<br />\n";
$meta = mysql_fetch_field($result, $i);
$i++;
echo "Meta $meta, $result\n";
}
mysql_free_result($result);
mysql_close($conn);
?>
Expected result:
----------------
It should work
Actual result:
--------------
It crashes
--
Edit bug report at http://bugs.php.net/?id=35753&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=35753&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=35753&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=35753&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=35753&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=35753&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=35753&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=35753&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=35753&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=35753&r=support
Expected behavior: http://bugs.php.net/fix.php?id=35753&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=35753&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=35753&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=35753&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35753&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=35753&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=35753&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=35753&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=35753&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=35753&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=35753&r=mysqlcfg