Bug #45150 [Com]: MySQL functions cannot be used with 5.3.x on Vista when using "localhost"

From: Date: Tue, 16 Nov 2010 03:18:31 +0000
Subject: Bug #45150 [Com]: MySQL functions cannot be used with 5.3.x on Vista when using "localhost"
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-156075@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=45150&edit=1

 ID:                 45150
 Comment by:         slava at shabrov dot com
 Reported by:        conor dot kerr_php at dev dot ceon dot net
 Summary:            MySQL functions cannot be used with 5.3.x on Vista
                     when using "localhost"
 Status:             Bogus
 Type:               Bug
 Package:            MySQL related
 Operating System:   Windows Vista
 PHP Version:        5.3CVS-2008-07-23 (snap)
 Block user comment: N
 Private report:     N

 New Comment:

Just upgraded PHP to v 5.3.3 and got this problem. This thread helped.
In addition to adding to the 'host' file
127.0.0.1       localhost 
you need to comment out 
#::1             localhost 

Fixed this issue to me. I would blame here MySQL not supporting IPv6.

Windows 7 x64; PHP 5.3.3 FastCGI; MySQL 5.1.38


Previous Comments:
------------------------------------------------------------------------
[2010-10-19 01:39:24] iswald at yahoo dot com

Same problem, 127.0.0.1 works, but localhost times out in MySQL, though
not SQL Server. Went to add 

127.0.0.1 localhost

to the hosts file, however, it was already there. Not Fixed. Needs
better documentation at least, even if it is a MS problem.

(PHP 5.3.3.0, MySQL 5.1.51, Windows Vista SP 2, no Apache)

------------------------------------------------------------------------
[2010-09-11 16:32:18] zarlean at yahoo dot com

I got this to work in Windows 7 (Apache 2.2, PHP 5.3.3, MySQL 5.1.44) 
by adding the line

127.0.0.1 localhost

to the hosts file in C:/Windows/System32/drivers/etc/

------------------------------------------------------------------------
[2010-09-06 11:18:20] uw@php.net

Bogus AKA duplicate http://bugs.php.net/bug.php?id=48082

------------------------------------------------------------------------
[2010-09-06 08:51:40] songchongzhan at gmail dot com

Did you disable networking on windows. I use MySQL Query Browser connect
to MySQL, 
it has MySQL Error Number 2003. Use mysqli connect to MySQL, it return
like what 
you post:[2002].....
And I use named pipe connect to MySQL by MySQL Query Browser, it is OK,
by php 
5.3.x does not support it util now.
Try to open MySQL network connection.

------------------------------------------------------------------------
[2010-07-06 19:10:38] andrey@php.net

PLEASE READ THIS : 

http://blogs.iis.net/donraman/archive/2010/06/11/php-5-3-and-mysql-connectivity-problem.aspx

------------------------------------------------------------------------


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/bug.php?id=45150


-- 
Edit this bug report at http://bugs.php.net/bug.php?id=45150&edit=1


Thread (21 messages)

« previous php.bugs (#156075) next »