Bug #69393 [NEW]: fread() function on TLS stream timeout
| From: | contact at sshilko dot com | Date: | Tue, 07 Apr 2015 10:29:17 +0000 |
| Subject: | Bug #69393 [NEW]: fread() function on TLS stream timeout | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-191872@lists.php.net to get a copy of this message | ||
From: contact at sshilko dot com
Operating system: Linux
PHP version: 5.5.23
Package: Streams related
Bug Type: Bug
Bug description: fread() function on TLS stream timeout
Description:
------------
The fread() call on TLS (SSL) stream times out after 60 seconds and does
not honor the stream_set_timeout() values.
5.5.23 (tested) and probably 5.6.7 affected, 5.5.22 worked fine.
Related git threads:
https://github.com/duccio/ApnsPHP/issues/84
https://github.com/php/php-src/pull/971
Test script:
---------------
https://gist.github.com/sshilko/41f04ddaaf5f73f0bb91
Expected result:
----------------
PHP 5.5.22-1+deb.sury.org~precise+1 (cli) (built: Feb 20 2015 11:25:27)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies
with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2015, by Zend
Technologies
Sending 172 bytes over tls://gateway.sandbox.push.apple.com:2195:
Socket state:
Array
(
[stream_type] => tcp_socket/ssl
[mode] => r+
[unread_bytes] => 0
[seekable] =>
[timed_out] =>
[blocked] =>
[eof] =>
)
Timeout set: 1
Has errors:
string(0) ""
real 0m0.261s
user 0m0.040s
sys 0m0.036s
Actual result:
--------------
PHP 5.5.23-1+deb.sury.org~precise+2 (cli) (built: Mar 24 2015 11:00:01)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies
with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2015, by Zend
Technologies
Sending 172 bytes over tls://gateway.sandbox.push.apple.com:2195:
Socket state:
Array
(
[stream_type] => tcp_socket/ssl
[mode] => r+
[unread_bytes] => 0
[seekable] =>
[timed_out] =>
[blocked] =>
[eof] =>
)
Timeout set: 1
Has errors:
string(0) ""
real 1m0.305s
user 0m19.553s
sys 0m39.170s
--
Edit bug report at https://bugs.php.net/bug.php?id=69393&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=69393&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=69393&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=69393&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=69393&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=69393&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=69393&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=69393&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=69393&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=69393&r=support
Expected behavior: https://bugs.php.net/fix.php?id=69393&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=69393&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=69393&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=69393&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=69393&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=69393&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=69393&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=69393&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=69393&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=69393&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=69393&r=mysqlcfg