Bug #53382 [Fbk->Csd]: 'localhost' not resolved
| From: | geoffreyfishing at users dot sourceforge dot net | Date: | Tue, 23 Nov 2010 03:50:35 +0000 |
| Subject: | Bug #53382 [Fbk->Csd]: 'localhost' not resolved | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-156292@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=53382&edit=1
ID: 53382
User updated by: geoffreyfishing at users dot sourceforge dot net
Reported by: geoffreyfishing at users dot sourceforge dot net
Summary: 'localhost' not resolved
-Status: Feedback
+Status: Closed
Type: Bug
Package: Network related
Operating System: vista (maybe win7)
PHP Version: 5.3.3
Block user comment: N
Private report: N
New Comment:
Duplicate
Previous Comments:
------------------------------------------------------------------------
[2010-11-23 04:46:34] cataphract@php.net
I can't reproduce the gethostbyname problem in Vista. I get
'127.0.0.1'.
As to your mysql problems, please try 5.3.4RC1, which you can download
from http://windows.php.net/qa/ . If that solves the mysql
problem, then
it's likely bug #50953.
------------------------------------------------------------------------
[2010-11-23 04:20:30] geoffreyfishing at users dot sourceforge dot net
Description:
------------
Basically PHP does not convert the DNS name 'localhost' to '127.0.0.1'
like it
should.
Test script:
---------------
<?php
//THIS WON'T REPRODUCE IF YOU DON'T RUN IT ON VISTA
echo gethostbyname('localhost');
//Basically applies to any other PHP function that resolves 'localhost'
echo mysql_connect('localhost', 'root', '');
?>
Expected result:
----------------
127.0.0.1
[some link identifier]
Actual result:
--------------
localhost
false
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=53382&edit=1