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

 ID:               45150
 Comment by:       buana95 at yahoo 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)

 New Comment:

Same issue on Windows XP SP3 and PHP 5.3.1 with mysqlnd 5.0.5-dev -
081106 - $Revision: 289630 $. 



Work fine when using *libmysql.dll, but can not connect to database when
using *mysqlnd.dll (tested on mysql, mysqli, and PDO extension).



***



>From MySQL website: they have resolved the issue by looping to all
available IP (IPv4 - IPv6) and return the first successful connection.



So, it's must be from PHP streams that fail to resolve IPv6.



Never test on newer PHP version. Sorry.


Previous Comments:
------------------------------------------------------------------------
[2010-04-05 07:52:30] telstra at dark-media dot net

Had the same problem on Windows Server 2008 R2 had to edit the hosts
file and un comment out the 127.0.0.1 localhost



Was stumbled for a while after upgrading from 5.2 to 5.3, this might not
be a bug with PHP but its something that is going to cause issues.

------------------------------------------------------------------------
[2010-03-16 13:55:28] achurkin at gmail dot com

Same on Windows 7 Home Edition.

In PHP version 5.2.9 on same system everything works fine.

------------------------------------------------------------------------
[2010-03-05 20:51:16] paj...@php.net

That's not a bug, please refer to the dozen other reports about that.

------------------------------------------------------------------------
[2010-03-05 20:46:38] changeorders at gmail dot com

Fresh install of PHP 5.3.x on Server 2008. Same problem. Had to comment
out the IPv6 entry for localhost in the hosts file. This is still a bug.

------------------------------------------------------------------------
[2008-07-23 13:27:36] conor dot kerr_php at dev dot ceon dot net

Okay,



I've looked into this further and tested with PHP5.2.6 on the same setup
and get the same problem.



I've seen a few bugs in the database which refer to this same
localhost/127.0.0.1 issue.



I agree that it's not a PHP issue.



However, it will become a serious enough issue for people when they move
to 5.3 from a previous version as many PHP-based open source software
packages use "localhost" as their default database server host.



A lot of people will waste a lot of time unless it is made prevalent
somewhere that:



"127.0.0.1" should be used instead of "localhost" on Vista



OR: 



the line "::1  localhost" should be commented out in the hosts file for
Vista: "#::1  localhost"



Where is the best place to put this information? At the very least, it
should be part of the upgrade notes for 5.3 as, I'm willing to bet, many
PHP developers haven't previously used streams and this issue will not
have affected them until they upgrade to 5.3, at which point MySQL will
constantly time out on them because it does use streams and therefore is
susceptible to this windoze bug.



Hopefully there are no "Badly configured OS is not a PHP bug ->
Bogus"-type replies to this, that would not be helpful for the PHP
community at large!



This information needs to be made prevalent somewhere regarding 5.3.



Thanks,



I hope I've been of help to some others!



All the best...



Conor

http://ceon.net

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


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

Reply via email to