#50172 [Com]: Unable to communicate with the MySQL server service

2009-11-20 Thread ferd352+php at gmail dot com
 ID:   50172
 Comment by:   ferd352+php at gmail dot com
 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:

I'm having the same issue, along with other problems, trying to upgrade
from PHP 5.2 to 5.3 (VC9)

Just tried 5.3.1 on Win2k8_R2 IIS7.5 and I have to change "localhost"
to "127.0.0.1" in my scripts even though the hosts file already has the
entry 127.0.0.1


Previous Comments:


[2009-11-20 00:56:56] avivahl at gmail dot com

This bug still exists in the final 5.3.1 release. :-(
Reproduced here using Windows 7 w/ IIS 7.5 (FastCGI is used w/
Non-Thread-Safe php).
The workaround suggested by erik (editing hosts file) works for me.

Btw, PHP 5.3.0 (final) did not have this issue.



[2009-11-18 22:54:54] carsten_sttgt at gmx dot de

> 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



[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.1localhost

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.



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



#50172 [Com]: Unable to communicate with the MySQL server service

2009-11-20 Thread ferd352+php at gmail dot com
 ID:   50172
 Comment by:   ferd352+php at gmail dot com
 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:

Sorry, I seemed to miss the message above about commenting out the
"::1" line, which when I did resolved the issue.


Previous Comments:


[2009-11-20 13:14:56] ferd352+php at gmail dot com

I'm having the same issue, along with other problems, trying to upgrade
from PHP 5.2 to 5.3 (VC9)

Just tried 5.3.1 on Win2k8_R2 IIS7.5 and I have to change "localhost"
to "127.0.0.1" in my scripts even though the hosts file already has the
entry 127.0.0.1



[2009-11-20 00:56:56] avivahl at gmail dot com

This bug still exists in the final 5.3.1 release. :-(
Reproduced here using Windows 7 w/ IIS 7.5 (FastCGI is used w/
Non-Thread-Safe php).
The workaround suggested by erik (editing hosts file) works for me.

Btw, PHP 5.3.0 (final) did not have this issue.



[2009-11-18 22:54:54] carsten_sttgt at gmx dot de

> 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



[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.1localhost

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.



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