#35753 [Opn->Fbk]: mysql_fetch_field + mysql 5.0.17 crashes PHP

From: Date: Tue, 20 Dec 2005 23:57:50 +0000
Subject: #35753 [Opn->Fbk]: mysql_fetch_field + mysql 5.0.17 crashes PHP
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-90767@lists.php.net to get a copy of this message
ID: 35753 Updated by: tony2001@php.net Reported By: reweiner at yahoo dot com -Status: Open +Status: Feedback Bug Type: MySQL related Operating System: RedHat AS 3.0 PHP Version: 5.1.1 New Comment: 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. Previous Comments: ------------------------------------------------------------------------ [2005-12-21 00:49:41] reweiner at yahoo dot com 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 this bug report at http://bugs.php.net/?id=35753&edit=1

« previous php.bugs (#90767) next »