#44605 [NEW]: stream_select() and fopen("php://output", "w")
| From: | jc_mammana at hotmail dot com | Date: | Wed, 02 Apr 2008 08:25:44 +0000 |
| Subject: | #44605 [NEW]: stream_select() and fopen("php://output", "w") | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-123844@lists.php.net to get a copy of this message | ||
From: jc_mammana at hotmail dot com
Operating system: Win32
PHP version: 5.2.5
PHP Bug Type: Streams related
Bug description: stream_select() and fopen("php://output", "w")
Description:
------------
This code gave me an error :
# $stdout = fopen("php://output", "wb" );
# (...)
# $sw = array($stdout);
# $sr = $se = NULL;
# $r = stream_select($sr, $sw, $se, 3);
# fwrite($stdout, "hello php world!" );
# flush();
So there is no way to detect if the client is able to receive data (in
case of non gracefully disconnection).
Expected result:
----------------
stream_select should return 0 (for timeout reason) if the client is
disconnected.
Actual result:
--------------
PHP ERROR : cannot represent a stream of type Output as a select()able
descriptor
--
Edit bug report at http://bugs.php.net/?id=44605&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44605&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44605&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44605&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=44605&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=44605&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=44605&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=44605&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=44605&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=44605&r=support
Expected behavior: http://bugs.php.net/fix.php?id=44605&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=44605&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=44605&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=44605&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44605&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=44605&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=44605&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=44605&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=44605&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=44605&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=44605&r=mysqlcfg