|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2011-11-18 16:14 UTC] anon at anon dot anon
[2011-11-20 16:38 UTC] johannes@php.net
[2011-11-20 16:38 UTC] johannes@php.net
-Status: Open
+Status: Bogus
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 14:00:01 2025 UTC |
Description: ------------ If no connection currently exists and mysql_query is run without specifying connection info, mysql_error returns: "No connection could be made because the target machine actively refused it." This is not true. This is heinously deceptive: • "target machine" indicates a database server. • "actively refused" means a server RECEIVED the request AND DENIED it. This leads one to believe invalid credentials have been supplied or that the specified account is not configured (Host=) as expected. The error message should be changed to reflect the fact that no database connection (or connection information) exists. (this is especially troublesome when working with PDO coupled with a function since functions are only aware of the variables that are passed to them) Test script: --------------- <?php mysql_query("SELECT * FROM database.table;") or die(mysql_error()); ?>