|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16302 socket_set_timeout closes connection
Submitted: 2002-03-27 01:44 UTC Modified: 2002-06-04 04:36 UTC
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: landmann at verex dot at Assigned:
Status: Not a bug Package: Network related
PHP Version: 4.0.6 OS: Windows 2000
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: landmann at verex dot at
New email:
PHP Version: OS:


 [2002-03-27 01:44 UTC] landmann at verex dot at
$ftp=fsockopen($ip, 21, &$errorno, &$errorstr, $timeout);
$returnstring .= "blocking is on?: " . socket_set_blocking($ftp, 0);

The socket_set_blocking terminates the conection immedeatly - when i turn the socket_set_blocking On the script works fine (as long there is data on the connection).

btw. the scripting timeout ($timeout) is beeing completly ignored if there is no data waiting, the script stops until the maximum execution time is reached...


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-04 04:36 UTC]
Thank you for taking the time to report a problem with PHP.
Unfortunately your version of PHP is too old -- the problem
might already be fixed. Please download a new PHP
version from

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Wed Oct 04 16:01:26 2023 UTC