php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30605 not a valid MySQL-Link resource
Submitted: 2004-10-29 00:02 UTC Modified: 2004-11-08 00:32 UTC
From: v_shiray at ukr dot net Assigned:
Status: Not a bug Package: Reproducible crash
PHP Version: 4.3.9 OS: Linux
Private report: No CVE-ID: None
 [2004-10-29 00:02 UTC] v_shiray at ukr dot net
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);


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-10-29 00:06 UTC] derick@php.net
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

Never post the same bug twice, have patience.
 [2004-11-08 00:33 UTC] v_shiray at ukr dot net
Sorry for persistence but no one has answered on this
issue on php-general@lists.php.net ...
http://marc.theaimsgroup.com/?t=109901656700004&r=1&w=2

Maybe you will be able to answer shortly as you
answered that I am not correct.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Tue Feb 18 15:01:28 2020 UTC