|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47929 stream_set_timeout() does not work for ssl connections
Submitted: 2009-04-08 20:42 UTC Modified: 2009-09-26 01:00 UTC
Avg. Score:4.7 ± 0.7
Reproduced:7 of 7 (100.0%)
Same Version:1 (14.3%)
Same OS:2 (28.6%)
From: S dot Muszytowski at googlemail dot com Assigned:
Status: No Feedback Package: Streams related
PHP Version: 5.2.9 OS: Debian 5 (lenny)
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: S dot Muszytowski at googlemail dot com
New email:
PHP Version: OS:


 [2009-04-08 20:42 UTC] S dot Muszytowski at googlemail dot com
stream_set_timeout doesn't work for ssl connections opened by fsockopen

referenced to

Reproduce code:
//referenced to

$fp = fsockopen("ssl://", 443);
//endlessloop.php is simply running an endless loop without output
fwrite($fp, "GET /endlessloop.php HTTP/1.0\r\n\r\n");
$timeoutSet = stream_set_timeout($fp, 5);
if ($timeoutSet)
    $res = fread($fp, 2000);
    $info = stream_get_meta_data($fp);
    if ($info['timed_out'])
        echo 'Connection timed out!';flush();
       echo $res;

Expected result:
it should print echo 'Connection timed out!';flush();

Actual result:
nothing happens - the function seems to be ignored


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-09-18 19:03 UTC]
Please try using this snapshot:
For Windows:

 [2009-09-26 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Jun 19 04:01:31 2024 UTC