#30592 [NEW]: not a valid MySQL-Link resource

From: Date: Wed, 27 Oct 2004 23:52:41 +0000
Subject: #30592 [NEW]: not a valid MySQL-Link resource
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-68415@lists.php.net to get a copy of this message
From: v_shiray at ukr dot net Operating system: Linux PHP version: 4.3.9 PHP Bug Type: MySQL related Bug description: not a valid MySQL-Link resource Description: ------------ Below code has produced next output: Current connections: Resource id #4, Resource id #4 PHP Warning: mysql_query(): 4 is not a valid MySQL-Link resource in ... Tested on Linux Slackware 10.0 PHP Version => 4.3.9 System => Linux gate 2.4.27-lck3 #3 ðÔÎ á×Ç 13 01:00:30 EEST 2004 i686 Build Date => Sep 30 2004 23:01:51 Configure Command => './configure' '--prefix=/opt/php' '--with-config-file-path=/opt/php/etc' '--disable-cgi' '--enable-static' '--disable-shared' '--enable-sockets' '--enable-ftp' '--with-mysql=/usr' '--with-zlib=/usr' PS. PHP 4.3.6 and 4.3.7 are not affected for this problem. Reproduce code: --------------- error_reporting(E_ALL); $db1 = mysql_connect ('localhost', 'test', '1'); $db2 = mysql_connect ('localhost', 'test', '1'); echo "Current connections: $db1, $db2\n"; mysql_close($db2); $db2 = 0; mysql_query('SELECT 1+1', $db1); Expected result: ---------------- Resource ID must be available with $db1 -- Edit bug report at http://bugs.php.net/?id=30592&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30592&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30592&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30592&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=30592&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=30592&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=30592&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=30592&r=needscript Try newer version: http://bugs.php.net/fix.php?id=30592&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=30592&r=support Expected behavior: http://bugs.php.net/fix.php?id=30592&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=30592&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=30592&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=30592&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30592&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=30592&r=dst IIS Stability: http://bugs.php.net/fix.php?id=30592&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=30592&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=30592&r=float MySQL Configuration Error: http://bugs.php.net/fix.php?id=30592&r=mysqlcfg

« previous php.bugs (#68415) next »