#43796 [Com]: stream_set_timeout() does not work with ssl
| From: | S dot Muszytowski at googlemail dot com | Date: | Wed, 08 Apr 2009 20:33:23 +0000 |
| Subject: | #43796 [Com]: stream_set_timeout() does not work with ssl | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-135669@lists.php.net to get a copy of this message | ||
ID: 43796
Comment by: S dot Muszytowski at googlemail dot com
Reported By: kirsch at mediafinanz dot de
Status: No Feedback
Bug Type: Streams related
Operating System: Windows XP SP 2
PHP Version: 5.2.5
New Comment:
I reproduced the bug with
php 5.2.9 on Debian 5 Lenny
The bug is the same, stream_set_timeout doesn't work with ssl
connection - even though it's working on non ssl connections.
In Addition - i tried the latest snapshots without any changes or
fixes.
Previous Comments:
------------------------------------------------------------------------
[2008-05-27 01:00:00] 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".
------------------------------------------------------------------------
[2008-05-19 22:56:36] jani@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows (zip):
http://snaps.php.net/win32/php5.2-win32-latest.zip
For Windows (installer):
http://snaps.php.net/win32/php5.2-win32-installer-latest.msi
------------------------------------------------------------------------
[2008-01-09 10:52:16] kirsch at mediafinanz dot de
Description:
------------
The function stream_set_timeout seems not to work with ssl. The timeout
is ignored and the script runs till the maximum execution timeout is
reached. Problem occurred on my development PC (Windows XP SP 2, PHP
5.2.5, Apache 2.6) and also on our Test-System (SuSE Linux 10, PHP
5.2.1, Apache 2.4). stream_set_timeout works when not using ssl.
Reproduce code:
---------------
$fp = fsockopen("ssl://127.0.0.1", 443);
//endlessloop.php is simply running an endless while 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:
----------------
After 5 seconds of trying to read an result without success, the
connection should time out and output "Connection timed out";
Actual result:
--------------
After 60 seconds of trying to read from the stream, the fatal error
"maximum execution time exeeded" occurrs.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=43796&edit=1