|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24924 timeout don't work - URGENT ISSUE
Submitted: 2003-08-03 13:24 UTC Modified: 2003-08-04 08:31 UTC
From: gdoroftei at sicme dot ro Assigned:
Status: Not a bug Package: Sockets related
PHP Version: 4.3.3RC2 OS: RedHat 8
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.
Block user comment
Status: Assign to:
Bug Type:
From: gdoroftei at sicme dot ro
New email:
PHP Version: OS:


 [2003-08-03 13:24 UTC] gdoroftei at sicme dot ro

I use fsockopen to query a list of sites. I wish that script to continue when the connection can't be made (after a give TIMEOUT).
I had tryed the last RC but no success.
question: if connection isn't made the script will continue after that TIMEOUT?

Reproduce code:
$this->TIMEOUT = 10;

This line is used in a while().

$ptr = @fsockopen($server,$this->PORT,$this->TIMEOUT);

Actual result:
When the site is down or the connection can't be made the script is blocked. No error, nothing.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-08-03 14:24 UTC]
Timeout is the 5th parameter of fsockopen, see <>.
 [2003-08-04 07:41 UTC] gdoroftei at sicme dot ro
I did that, the same problem.
After few sites, the script is blocked.
 [2003-08-04 08:31 UTC]
Are you now using something like 
$ptr = @fsockopen($server,$this->PORT, $errno, $errstr, 
did you try this? 
echo "$errstr ($errno)"; 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Tue Mar 31 20:01:24 2020 UTC