Bug #52140 [Opn]: mysql_connect uses wrong IP-address for error-messages of further connections
| From: | johannes@php.net | Date: | Tue, 22 Jun 2010 21:54:45 +0000 |
| Subject: | Bug #52140 [Opn]: mysql_connect uses wrong IP-address for error-messages of further connections | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-151775@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=52140&edit=1
ID: 52140
Updated by: johannes@php.net
Reported by: cscholz at gsd-web dot de
Summary: mysql_connect uses wrong IP-address for error-messages
of further connections
Status: Open
Type: Bug
Package: MySQL related
Operating System: Ubuntu 10.4
PHP Version: 5.3.2
New Comment:
The error message should contain the IP address of the host running PHP
as it is used for authentication by MySQL. Is 192.168.0. The IP of the
web server?
Previous Comments:
------------------------------------------------------------------------
[2010-06-22 11:34:21] cscholz at gsd-web dot de
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 this bug report at http://bugs.php.net/bug.php?id=52140&edit=1