From: flape at pobox dot sk
Operating system: Win2K
PHP version: 4.3.3
PHP Bug Type: Filesystem function related
Bug description: stream_select

Description:
------------
stream_select aplied on a file handle - that is told to be a stream too -
emiadelly returns.

Reproduce code:
---------------
<?
$fh = fopen('debug.txt','r+');
stream_set_blocking($fh ,false);
$ra = array($fh);
while(true){
while(0 == stream_select($ra,$w = NULL,$e = NULL,20))
$text = fgets($fh,10);
echo $text;

flush();
ob_flush();

}
fclose($fh);
?>


Expected result:
----------------
It should prit the context of debug.txt and everithing what was added to
that file after starting the script.

Actual result:
--------------
Warning: stream_select(): unable to select [0]: No error in
c:\temp\htdocs\debug.php on line 7

--
Edit bug report at [url]http://bugs.php.net/?id=25933&edit=1[/url]
--
Try a CVS snapshot (php4): [url]http://bugs.php.net/fix.php?id=25933&r=trysnapshot4[/url]
Try a CVS snapshot (php5): [url]http://bugs.php.net/fix.php?id=25933&r=trysnapshot5[/url]
Fixed in CVS: [url]http://bugs.php.net/fix.php?id=25933&r=fixedcvs[/url]
Fixed in release: [url]http://bugs.php.net/fix.php?id=25933&r=alreadyfixed[/url]
Need backtrace: [url]http://bugs.php.net/fix.php?id=25933&r=needtrace[/url]
Try newer version: [url]http://bugs.php.net/fix.php?id=25933&r=oldversion[/url]
Not developer issue: [url]http://bugs.php.net/fix.php?id=25933&r=support[/url]
Expected behavior: [url]http://bugs.php.net/fix.php?id=25933&r=notwrong[/url]
Not enough info: [url]http://bugs.php.net/fix.php?id=25933&r=notenoughinfo[/url]
Submitted twice: [url]http://bugs.php.net/fix.php?id=25933&r=submittedtwice[/url]
register_globals: [url]http://bugs.php.net/fix.php?id=25933&r=globals[/url]
PHP 3 support discontinued: [url]http://bugs.php.net/fix.php?id=25933&r=php3[/url]
Daylight Savings: [url]http://bugs.php.net/fix.php?id=25933&r=dst[/url]
IIS Stability: [url]http://bugs.php.net/fix.php?id=25933&r=isapi[/url]
Install GNU Sed: [url]http://bugs.php.net/fix.php?id=25933&r=gnused[/url]
Floating point limitations: [url]http://bugs.php.net/fix.php?id=25933&r=float[/url]