ID: 32798 Updated by: [EMAIL PROTECTED] Reported By: wkonkel at mindshare dot net -Status: Open +Status: Bogus Bug Type: MySQL related Operating System: FreeBSD PHP Version: 4.3.10 New Comment:
. Previous Comments: ------------------------------------------------------------------------ [2005-04-22 00:38:09] [EMAIL PROTECTED] Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. ------------------------------------------------------------------------ [2005-04-22 00:34:29] wkonkel at mindshare dot net Description: ------------ I have found the same problem as this bogus bug (it's not bogus though): http://bugs.php.net/bug.php?id=26114 This is still an issue in 4.3.10 and is not bogus. You cannot pass $link2 as a parameter to mysql_error becuase upon a failed connection, $link2 is false. How do you get the errno/error? Reproduce code: --------------- Scenario 1: $link1 = @mysql_connect("localhost","user","pass"); $link2 = @mysql_connect("blah","user","pass") or die("error: " . mysql_errno() . " -- " . mysql_error()); Scenario 2: //$link1 = @mysql_connect("localhost","user","pass"); $link2 = @mysql_connect("blah","user","pass") or die("error: " . mysql_errno() . " -- " . mysql_error()); Expected result: ---------------- Scenario 1: error: 2005 -- Lost connection to MySQL server during query Scenario 2: error: 2005 -- Lost connection to MySQL server during query Actual result: -------------- Scenario 1: error: 0 -- Scenario 2: error: 2005 -- Lost connection to MySQL server during query ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=32798&edit=1
