ID: 22297
Updated by: [EMAIL PROTECTED]
Reported By: sp at m-me dot dk
-Status: Open
+Status: Feedback
Bug Type: Filesystem function related
Operating System: Windows
PHP Version: 4.3.2-dev
New Comment:
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?
Previous Comments:
------------------------------------------------------------------------
[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)..
------------------------------------------------------------------------
[2003-02-20 19:20:47] sp at m-me dot dk
I did a little test to try to find out when the script fails. It looks
like the script fails everytime the "max_execution_time" is smaller
than "2 * default_socket_timeout".
max_execution_time default_socket_timeout output
------------------------------------------------------
60 10 no error
25 10 no error
22 10 no error
21 10 no error
20 10 error
15 10 error
10 10 error
5 10 error
(when I write "no error" the script still runs for "2 *
default_socket_timeout" seconds though)
------------------------------------------------------------------------
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