|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #70718 stream_select() when OpenSSL extension is loaded on PHP Win64
Submitted: 2015-10-15 10:24 UTC Modified: 2015-10-16 12:37 UTC
From: php at maisqi dot com Assigned:
Status: Closed Package: OpenSSL related
PHP Version: 5.6.14 OS: Windows
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: php at maisqi dot com
New email:
PHP Version: OS:


 [2015-10-15 10:24 UTC] php at maisqi dot com
The test script fails on PHP x64 under Windows when the OpenSSL extension is selected on PHP.INI.

When it's not, or when I replace libeay32.dll and ssleay32.dll with the ones on, it works as expected.

It also works with PHP Win32.

Test script:
const TIMEOUT = 10;

$address = 'tcp://';
$s = stream_socket_client(

$read = [$s];
$write = [];
$except = [];

$errno = stream_select($read, $write, $except, TIMEOUT);
echo $errno === false ? 'Error' : 'Ok';

Expected result:
It should print "Ok".

Actual result:
It prints "Error" and issues the following warning:
   Warning: stream_select(): unable to select [2]: No such file or directory (max_fd=248) in [...] on line 17


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2015-10-16 12:37 UTC] php at maisqi dot com
Actually, the DLLs from Indyproject were stopping OpenSSL from loading. I used the ones from the 64bits build of Apache on Windows (from instead, and it does work now.

So the problem really lies somewhere between OpenSSL and the socket lib, but more probably on the former.
 [2015-10-26 14:58 UTC]
Automatic comment on behalf of ab
Log: Fixed bug #70718 stream_select() when OpenSSL extension is loaded on PHP Win64
 [2015-10-26 14:58 UTC]
-Status: Open +Status: Closed
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Jan 21 15:01:23 2021 UTC