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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Sun Jul 06 15:01:35 2025 UTC