ID:               47929
 Updated by:       j...@php.net
 Reported By:      S dot Muszytowski at googlemail dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         Streams related
 Operating System: Debian 5 (lenny)
 PHP Version:      5.2.9
 New Comment:

Please try using this snapshot:

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

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




Previous Comments:
------------------------------------------------------------------------

[2009-04-08 20:42:34] 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


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=47929&edit=1

Reply via email to