Bug #52140 [NEW]: mysql_connect uses wrong IP-address for error-messages of further connections
From:
Operating system: Ubuntu 10.4
PHP version: 5.3.2
Package: MySQL related
Bug Type: Bug
Bug description:mysql_connect uses wrong IP-address for error-messages of further connections
Description:
------------
When doing more than one mysql_connect the error message will return the
wrong ip-address in the reply if subsequent connections use a different
IP.
This bug is also true for mysqli_connect by the way.
Test script:
---------------
<?
mysql_connect ( '192.168.0.1' , 'valid user' , 'valid password' );
mysql_connect ( '192.168.0.2' , 'invalid user' , 'or invalid password'
);
?>
Expected result:
----------------
Warning: mysql_connect() [function.mysql-connect]: Access denied for user
'invalid user'@'192.168.0.2' (using password: YES) in thecode.php on line 4
Actual result:
--------------
Warning: mysql_connect() [function.mysql-connect]: Access denied for user
'invalid user'@'192.168.0.1' (using password: YES) in thecode.php on line 4
--
Edit bug report at http://bugs.php.net/bug.php?id=52140&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=52140&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=52140&r=trysnapshot53
Try a snapshot (trunk): http://bugs.php.net/fix.php?id=52140&r=trysnapshottrunk
Fixed in SVN: http://bugs.php.net/fix.php?id=52140&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=52140&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=52140&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=52140&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=52140&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=52140&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=52140&r=support
Expected behavior: http://bugs.php.net/fix.php?id=52140&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=52140&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=52140&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=52140&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=52140&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=52140&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=52140&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=52140&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=52140&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=52140&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=52140&r=mysqlcfg
Thread (4 messages)
- cscholz at gsd-web dot de