#47929 [Opn->Fbk]: stream_set_timeout() does not work for ssl connections
| From: | jani@php.net | Date: | Fri, 18 Sep 2009 19:03:47 +0000 |
| Subject: | #47929 [Opn->Fbk]: stream_set_timeout() does not work for ssl connections | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-142546@lists.php.net to get a copy of this message | ||
ID: 47929
Updated by: jani@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