PHP :: Bug #74410 :: stream_select() is broken on Windows Nanoserver |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74410 stream_select() is broken on Windows Nanoserver
Submitted: 2017-04-11 07:53 UTC Modified: 2017-04-11 09:01 UTC
From: Assigned: mattficken (profile)
Status: Closed Package: Streams related
PHP Version: 7.1.3 OS: Windows Nanoserver
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
25 + 1 = ?
Subscribe to this entry?

 [2017-04-11 07:53 UTC]
stream_select() is broken by recent updates to Nanoserver, the reduced resource edition of Windows Server (Nanoserver supports x64 applications and enough windows APIs that PHP and most applications run on it like any other edition of Windows, just with no GUI).

For standard streams, such as with proc_open from system_with_timeout() function in run-tests.php, stream_select() will return
FALSE immediately regardless of any pending IO on those streams.

Ultimately, this is caused because recently Nanoserver deprecated/stubbed MsgWaitForMultipleObjects(), which is used by php_select() which is used
by PHP on regular Windows and Nanoserver (which only support select() for sockets).


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2017-04-11 07:54 UTC]
Calling WaitForMultipleObjects() instead of MsgWaitForMultipleObjects() is the solution - so no special action is needed for Nanoserver.

With this patch, stream_selct() still works on regular Windows and works again on Nanoserver. Verified with run-tests.php.
 [2017-04-11 09:00 UTC]
Automatic comment on behalf of mattficken
Log: Fix #74410 by calling WaitForMultipleObjects() instead of MsgWaitForMultipleObjects()
 [2017-04-11 09:00 UTC]
-Status: Open +Status: Closed
 [2017-04-11 09:00 UTC]
Automatic comment on behalf of mattficken
Log: Fix #74410 by calling WaitForMultipleObjects() instead of MsgWaitForMultipleObjects()
 [2017-04-11 09:01 UTC]
-Assigned To: +Assigned To: mattficken
 [2017-04-11 09:01 UTC]
PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Thu Aug 16 07:01:24 2018 UTC