php.net |  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
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.
Password:
Status:
Package:
Bug Type:
Summary:
From: php at maisqi dot com
New email:
PHP Version: OS:

 

 [2015-10-15 10:24 UTC] 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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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 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-26 14:58 UTC] ab@php.net
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
 [2015-10-26 14:58 UTC] ab@php.net
-Status: Open +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 08:01:29 2024 UTC