php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33960 fsockopen() timeout parameter has no function
Submitted: 2005-08-02 10:27 UTC Modified: 2005-08-02 18:44 UTC
From: cyberline at techno4ever dot net Assigned:
Status: Not a bug Package: Sockets related
PHP Version: 5.0.4 OS: Suse 9.3
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: cyberline at techno4ever dot net
New email:
PHP Version: OS:

 

 [2005-08-02 10:27 UTC] cyberline at techno4ever dot net
Description:
------------
When i set a timelimit for fsockopen() the script won't stop after the limit reaches.

Reproduce code:
---------------
if($fp = fsockopen($host, $port, &$errno, &$errnum, 2)) {
 ...
}

Expected result:
----------------
When the checked host is offline, the script reported that afetr 2 seconds.

Actual result:
--------------
The Script is stopping after 60 seconds.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-08-02 18:44 UTC] sniper@php.net
See bug #24867 (you propably have error_reporting set too low or you're not displaying errors or you simply didn't paste the error here, so I'm guessing)

Also, RTFM:

"Note:  If you need to set a timeout for reading/writing data over the socket, use stream_set_timeout(), as the timeout  parameter to fsockopen() only applies while connecting the socket."

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 06:01:32 2024 UTC