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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
25 - 1 = ?
Subscribe to this entry?

 
 [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-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 11:01:29 2024 UTC