ID: 22297
User updated by: sp at m-me dot dk
Reported By: sp at m-me dot dk
-Status: Feedback
+Status: Open
Bug Type: Filesystem function related
Operating System: Windows
PHP Version: 4.3.2-dev
New Comment:
I have tried 3 different addresses:
localhost
127.0.0.1
www.the-real-domain.com
...all with the same result. Further more I have tried this on 3
different machines (two Windows XP and one Windows 2000 - some even on
different networks).
The thing with Apache 1.3.x vs. Apache 2.x have crossed my mind as I
wrote earlier. I'll try to install Apache 1.3.x and return with the
results here asap.
Previous Comments:
------------------------------------------------------------------------
[2003-02-21 07:54:44] [EMAIL PROTECTED]
Are you sure that you have your DNS (client) settings correct on the
windows machine(s)?
eg: multiple entries for localhost in the hosts file, or multiple
domains to auto-search when a suffix is missing configured in your DNS
server (if you have one)?
It doesn't make sense for PHP to attempt multiple addresses when it can
only detect a single address.
Is there any chance you can try apache 1.3.x on one of the windows
servers to see if that has an effect?
------------------------------------------------------------------------
[2003-02-21 06:26:39] sp at m-me dot dk
Using 127.0.0.1 instead of localhost had no effect. The script still
took "2 * default_socket_timeout" seconds.
The var_dump(gethostbynamel("localhost")); returned (with no delay):
--------------------------------------------------------
array(1) {
[0]=>
string(9) "127.0.0.1"
}
--------------------------------------------------------
------------------------------------------------------------------------
[2003-02-21 05:13:21] [EMAIL PROTECTED]
Could you also paste the output of this script:
<?php
var_dump(gethostbynamel("localhost"));
?>
------------------------------------------------------------------------
[2003-02-21 05:00:06] [EMAIL PROTECTED]
Can you try using "127.0.0.1" instead of "localhost" in your script?
If that fixes it for you, I will add equivalent code into the PHP core
itself (when running under windows).
------------------------------------------------------------------------
[2003-02-20 19:31:47] sp at m-me dot dk
[EMAIL PROTECTED] writes:
"Your system has determined two alternative addresses to attempt to
contact for localhost and it attempts each alternative for
default_socket_timeout in seconds."
I'm not into how the file() function tries to read an URL, but after
what [EMAIL PROTECTED] writes it seems that it tries a couple of different
methods for reading the URL if the previous ones does not work. For me
it looks like the first 2 does not work, but the 3th does.
If that is right it then makes sense that the "max_execution_time" has
to be larger than "2 * default_socket_timeout" (because the first two
tries have to time out fist)..
------------------------------------------------------------------------
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/22297
--
Edit this bug report at http://bugs.php.net/?id=22297&edit=1