#33098 [NEW]: mysql_fetch_array(mysql_query("mysql query here")) crashes

From: Date: Sat, 21 May 2005 23:06:45 +0000
Subject: #33098 [NEW]: mysql_fetch_array(mysql_query("mysql query here")) crashes
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-79325@lists.php.net to get a copy of this message
From: tloudimm at go2 dot pl Operating system: Linux PHP version: 4.3.11 PHP Bug Type: MySQL related Bug description: mysql_fetch_array(mysql_query("mysql query here")) crashes Description: ------------ hi there. i found a bug [well, i think it's a bug, it onced crashed my apache server].. found it in 4.3.10 first, than in 4.3.11 again. anyway, here's some sample code: <? mysql_connect($host,$user,$pass); mysql_select_db(some_db); while($mysql_answer = mysql_fetch_array(mysql_query("SELECT * FROM some_table")) { //do something - there goes a crash } ?> however <? mysql_connect($host,$user,$pass); mysql_select_db(some_db); $mysql_query = mysql_query("SELECT * FROM some_table"); while($mysql_answer = mysql_fetch_array($mysql_query) { //do something - nothing bad happens here } ?> i searched bug database and found nothing like my observations. sorry if i make too much mess - delete my report if so :) greetings. -- Edit bug report at http://bugs.php.net/?id=33098&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33098&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=33098&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=33098&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=33098&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=33098&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=33098&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=33098&r=needscript Try newer version: http://bugs.php.net/fix.php?id=33098&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=33098&r=support Expected behavior: http://bugs.php.net/fix.php?id=33098&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=33098&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=33098&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=33098&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33098&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=33098&r=dst IIS Stability: http://bugs.php.net/fix.php?id=33098&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=33098&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=33098&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=33098&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=33098&r=mysqlcfg

« previous php.bugs (#79325) next »