Bug #70718 [Opn->Csd]: stream_select() when OpenSSL extension is loaded on PHP Win64
Edit report at https://bugs.php.net/bug.php?id=70718&edit=1
ID: 70718
Updated by: ab@php.net
Reported by: php at maisqi dot com
Summary: stream_select() when OpenSSL extension is loaded on
PHP Win64
-Status: Open
+Status: Closed
Type: Bug
Package: OpenSSL related
Operating System: Windows
PHP Version: 5.6.14
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of ab
Revision: http://git.php.net/?p=php-src.git;a=commit;h=83bfefeccbae59168a5e6baf6eaf34db0a0047e0
Log: Fixed bug #70718 stream_select() when OpenSSL extension is loaded on PHP Win64
Previous Comments:
------------------------------------------------------------------------
[2015-10-16 12:37:06] 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 apachelounge.com) 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-15 10:24:44] php at maisqi dot com
Description:
------------
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 http://www.indyproject.org/Sockets/fpc/OpenSSLforWin64.en.aspx,
it works as expected.
It also works with PHP Win32.
Test script:
---------------
<?php
const TIMEOUT = 10;
$address = 'tcp://google.com:80';
$s = stream_socket_client(
$address,
/*&*/$errno,
/*&*/$errstr,
0,
STREAM_CLIENT_ASYNC_CONNECT | STREAM_CLIENT_CONNECT
);
$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
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=70718&edit=1
Thread (3 messages)