php.net |  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
Votes:7
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
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
Description:
------------
stream_set_timeout doesn't work for ssl connections opened by fsockopen

referenced to http://bugs.php.net/bug.php?id=43796


Reproduce code:
---------------
//referenced to http://bugs.php.net/bug.php?id=43796

$fp = fsockopen("ssl://127.0.0.1", 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();
     }
   else
     {
       echo $res;
     }
   fclose($fp);
 }


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

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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-09-18 19:03 UTC] jani@php.net
Please try using this snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/


 [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-2025 The PHP Group
All rights reserved.
Last updated: Wed Mar 12 10:01:31 2025 UTC