ID: 14740
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: Sockets related
Operating System: Win98 and Win2k
PHP Version: 4.1.0
New Comment:

ok to clarify.. seems like this is a common mistake

fsockopen() times out ok if the server doesn't exist.  The problem occurs when the 
server doesn't understand what is sent to it afterwards and stalls for a reply (ie, if 
the port is now used by another service).

I'll check the bugs for fwrite(), fgets() etc

Previous Comments:
------------------------------------------------------------------------

[2001-12-28 12:33:49] [EMAIL PROTECTED]

A simple query to a server with fsockopen() won't timeout if the requested server is
down.

$serverquery = fsockopen($host, $port, &$errno, &$errstr, $timeout);

The operation times out first (120 seconds), even if $timeout is as low as 1 second; 
it
works fine if I remove unavailable servers from the query list.  Sometimes the server
crashes if I try the function again before the last operation times out.

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

[2001-12-28 12:31:36] [EMAIL PROTECTED]

A simple query to a server with fsockopen() won't timeout if the requested server is 
down.

$serverquery = fsockopen($host, $port, &$errno, &$errstr, $timeout);

The operation times out first (120 seconds), even if $timeout is as low as 1 second; 
it works fine if I remove unavailable servers from the query list.  Sometimes the 
server crashes if I try the function again before the last operation times out.

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



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


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to