Bug #70718 [Opn]: stream_select() when OpenSSL extension is loaded on PHP Win64

From: Date: Fri, 16 Oct 2015 12:37:07 +0000
Subject: Bug #70718 [Opn]: stream_select() when OpenSSL extension is loaded on PHP Win64
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-196646@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=70718&edit=1

 ID:                 70718
 User updated by:    php at maisqi dot com
 Reported by:        php at maisqi dot com
 Summary:            stream_select() when OpenSSL extension is loaded on
                     PHP Win64
 Status:             Open
 Type:               Bug
 Package:            OpenSSL related
 Operating System:   Windows
 PHP Version:        5.6.14
 Block user comment: N
 Private report:     N

 New Comment:

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.


Previous Comments:
------------------------------------------------------------------------
[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)

« previous php.bugs (#196646) next »