From:
Operating system: Windows Server 2008
PHP version: 5.3.8
Package: MySQL related
Bug Type: Bug
Bug description:mysql_error: "connection actively refused" when no database
info is supplied
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());
?>
--
Edit bug report at https://bugs.php.net/bug.php?id=60315&edit=1
--
Try a snapshot (PHP 5.4):
https://bugs.php.net/fix.php?id=60315&r=trysnapshot54
Try a snapshot (PHP 5.3):
https://bugs.php.net/fix.php?id=60315&r=trysnapshot53
Try a snapshot (trunk):
https://bugs.php.net/fix.php?id=60315&r=trysnapshottrunk
Fixed in SVN:
https://bugs.php.net/fix.php?id=60315&r=fixed
Fixed in SVN and need be documented:
https://bugs.php.net/fix.php?id=60315&r=needdocs
Fixed in release:
https://bugs.php.net/fix.php?id=60315&r=alreadyfixed
Need backtrace:
https://bugs.php.net/fix.php?id=60315&r=needtrace
Need Reproduce Script:
https://bugs.php.net/fix.php?id=60315&r=needscript
Try newer version:
https://bugs.php.net/fix.php?id=60315&r=oldversion
Not developer issue:
https://bugs.php.net/fix.php?id=60315&r=support
Expected behavior:
https://bugs.php.net/fix.php?id=60315&r=notwrong
Not enough info:
https://bugs.php.net/fix.php?id=60315&r=notenoughinfo
Submitted twice:
https://bugs.php.net/fix.php?id=60315&r=submittedtwice
register_globals:
https://bugs.php.net/fix.php?id=60315&r=globals
PHP 4 support discontinued:
https://bugs.php.net/fix.php?id=60315&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=60315&r=dst
IIS Stability:
https://bugs.php.net/fix.php?id=60315&r=isapi
Install GNU Sed:
https://bugs.php.net/fix.php?id=60315&r=gnused
Floating point limitations:
https://bugs.php.net/fix.php?id=60315&r=float
No Zend Extensions:
https://bugs.php.net/fix.php?id=60315&r=nozend
MySQL Configuration Error:
https://bugs.php.net/fix.php?id=60315&r=mysqlcfg