#30605 [NEW]: Resource freeing
| From: | v_shiray at ukr dot net | Date: | Thu, 28 Oct 2004 22:02:14 +0000 |
| Subject: | #30605 [NEW]: Resource freeing | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-68452@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: Reproducible crash
Bug description: Resource freeing
Description:
------------
Sorry, but I has not received an answers on
my submision: http://bugs.php.net/bug.php?id=30592
Maybe I was wrong to set "Type of Bug" ...
So I expect "correct" answers or other opinion
for received results.
The problem has been detected on:
Slackware 10.0, MySQL 4.0.20, PHP 4.3.8, 4.3.9, 5.0.2
RedHat 9, MySQL 3.23.58, PHP 4.3.9
Expected result has received on:
Slackware 10.0, MySQL 4.0.20, PHP 4.3.6
or when line
$db2 = 0;
had been commented.
Reproduce code:
---------------
error_reporting(E_ALL);
$db1 = mysql_connect ('localhost', 'test', '1');
$db2 = mysql_connect ('localhost', 'test', '1');
mysql_close($db2);
$db2 = 0;
$result = mysql_query('SELECT 1+1', $db1);
if ($result)
{
$row = mysql_fetch_row($result);
echo "Result: {$row[0]}\n";
}
Expected result:
----------------
Result: 2
Actual result:
--------------
Warning: mysql_query(): 4 is not a valid MySQL-Link resource in ...
$result = mysql_query('SELECT 1+1', $db1);
--
Edit bug report at http://bugs.php.net/?id=30605&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30605&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30605&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30605&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=30605&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=30605&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=30605&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=30605&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=30605&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=30605&r=support
Expected behavior: http://bugs.php.net/fix.php?id=30605&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=30605&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=30605&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=30605&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30605&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=30605&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=30605&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=30605&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=30605&r=float
MySQL Configuration Error: http://bugs.php.net/fix.php?id=30605&r=mysqlcfg