#47929 [NEW]: stream_set_timeout doesn't work for ssl connections
| From: | S dot Muszytowski at googlemail dot com | Date: | Wed, 08 Apr 2009 20:42:34 +0000 |
| Subject: | #47929 [NEW]: stream_set_timeout doesn't work for ssl connections | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-135671@lists.php.net to get a copy of this message | ||
From: S dot Muszytowski at googlemail dot com
Operating system: Debian 5 (lenny)
PHP version: 5.2.9
PHP Bug Type: Unknown/Other Function
Bug description: stream_set_timeout doesn't work for ssl connections
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 bug report at http://bugs.php.net/?id=47929&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=47929&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=47929&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=47929&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=47929&r=fixedcvs
Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=47929&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=47929&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=47929&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=47929&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=47929&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=47929&r=support
Expected behavior: http://bugs.php.net/fix.php?id=47929&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=47929&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=47929&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=47929&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=47929&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=47929&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=47929&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=47929&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=47929&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=47929&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=47929&r=mysqlcfg