ID: 50172 Comment by: carsten_sttgt at gmx dot de Reported By: erik at navhost dot com Status: Assigned Bug Type: MySQL related Operating System: win32 only - Win. Server 2008 R2 PHP Version: 5.3.1RC4 Assigned To: mysql New Comment:
> So I guess this is a windows bug rather than PHP? No, it's a bug in the PHP stream transport. (mysqlnd is using PHP streams for the connection) --> If PHP is asking the OS for the IP for the host "localhost", it gets a list with 2 addrinfo structures (one for ::1 and the other for 127.0.0.1), but PHP is only trying a connection to the first one. Well, the MySQL server don't know IPV6, and thus the connection fails. Regards, Carsten Previous Comments: ------------------------------------------------------------------------ [2009-11-14 20:07:21] erik at navhost dot com A simple workaround is to uncomment/add this line to the host file: 127.0.0.1 localhost Worked for me. ------------------------------------------------------------------------ [2009-11-14 16:39:41] paj...@php.net I mean Bug #45150. But it looks like you may have met another issue. Assigned to the mysql team so they can for more details. ------------------------------------------------------------------------ [2009-11-14 15:58:37] erik at navhost dot com Looking into it further, the comment from pajoye fixes the issue in the vista-based Server 2008. However, Server 2008 R2 is based on Windows 7 and introduces a new feature on the resolving localhost... see from the hosts file: "localhost name resolution is handled within DNS itself." So I guess this is a windows bug rather than PHP? I can't see an easy solution here either way. ------------------------------------------------------------------------ [2009-11-14 04:06:39] erik at navhost dot com I can't seem to find the report you're referring to, but the issue still stands. Is it a IPv6 related issue? The ::1-line in the hosts file is already commented out. ------------------------------------------------------------------------ [2009-11-13 22:18:38] erik at navhost dot com Do you mean bug #48805? Anyway, that lin line is already commented out by an '#' in the server's hosts file. It was that way by default. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/50172 -- Edit this bug report at http://bugs.php.net/?id=50172&edit=1