php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13061 connection-timeout doesn't work
Submitted: 2001-08-30 11:23 UTC Modified: 2002-06-18 18:48 UTC
From: bastian at poettner dot net Assigned:
Status: Closed Package: Sockets related
PHP Version: 4.0.3pl1 OS: Linux 2.4.9
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: bastian at poettner dot net
New email:
PHP Version: OS:

 

 [2001-08-30 11:23 UTC] bastian at poettner dot net
I have the same problem using php and linux.

Here is my Code:

$server = "www.microsoft.com";
$start = time();
$fp=fsockopen($server,111,&$errno,&$errstr,30);
echo time()-$start."\n";

Being executed with php as binary (cgi) on the commandline

Cause on www.microsoft.com there no port 111 open, the connection can't succeed, but php should stop the connection-attempt after 30s (the timeout). It's doesn't, it always waits 789s. The is pretty annoying.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-08-30 11:53 UTC] bastian at poettner dot net
Sorry, I forgot to note, that i used no configure-options.
 [2001-08-31 10:08 UTC] bastian at poettner dot net
I updated the kernel to 2.4.9 and recompiled php 4.0.6 but it still didn't work.

Then i took the old php 4.0.3pl1 and now it works.

Seems very Strange to me...
 [2001-09-03 10:33 UTC] sander@php.net
Dupe of 10765
 [2002-06-18 18:48 UTC] sniper@php.net
This bug has been fixed in CVS. You can grab a snapshot of the
CVS version at http://snaps.php.net/. In case this was a documentation 
problem, the fix will show up soon at http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites.
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Fri May 20 01:05:45 2022 UTC