|  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
New email:
PHP Version: OS:


 [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-2023 The PHP Group
All rights reserved.
Last updated: Wed Dec 06 23:01:26 2023 UTC