Bug #70348 [NEW]: stream_select fails
| From: | mwilmes at avc dot edu | Date: | Mon, 24 Aug 2015 22:05:28 +0000 |
| Subject: | Bug #70348 [NEW]: stream_select fails | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-195489@lists.php.net to get a copy of this message | ||
From: mwilmes at avc dot edu
Operating system: Win 8.1 x64
PHP version: 5.6.12
Package: Streams related
Bug Type: Bug
Bug description:stream_select fails
Description:
------------
Using stream_select on Windows generates a warning:
Warning: stream_select(): unable to select [2]: No such file or
directory (max_fd=1168) in C:\path\x.php on line 8
Should not create an error. Note that fd changes per iteration. Error
exists using both CLI and Apache php5apache2_4.dll.
Test script:
---------------
<?php
$timeout = 15;
$socket = fsockopen("www.google.com",80,$errno,$errstr,$timeout);
fwrite($socket, "GET / HTTP/1.0\r\n\r\n");
echo fgets($socket);
fclose($socket);
echo "<br>";
$socket = fsockopen("www.google.com",80,$errno,$errstr,$timeout);
$sock_r = null;
$sock_w = array($socket);
$sock_e = null;
$result = stream_select($sock_r,$sock_w,$sock_e,$timeout);
if ($result !== false) {
fwrite($socket, "GET / HTTP/1.0\r\n\r\n");
echo fgets($socket);
}
fclose($socket);
?>
Expected result:
----------------
HTTP/1.0 200 OK
<br>
HTTP/1.0 200 OK
Actual result:
--------------
HTTP/1.0 200 OK
Warning: stream_select(): unable to select [2]: No such file or
directory (max_fd=1352) in C:\path\x.php on line 15
--
Edit bug report at https://bugs.php.net/bug.php?id=70348&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=70348&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=70348&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=70348&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=70348&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=70348&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=70348&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=70348&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=70348&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=70348&r=support
Expected behavior: https://bugs.php.net/fix.php?id=70348&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=70348&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=70348&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=70348&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=70348&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=70348&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=70348&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=70348&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=70348&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=70348&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=70348&r=mysqlcfg