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

From: Date: Thu, 15 Oct 2015 10:24:46 +0000
Subject: Bug #70718 [NEW]: stream_select() when OpenSSL extension is loaded on PHP Win64
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-196619@lists.php.net to get a copy of this message
From:             php at maisqi dot com
Operating system: Windows
PHP version:      5.6.14
Package:          OpenSSL related
Bug Type:         Bug
Bug description:stream_select() when OpenSSL extension is loaded on PHP Win64

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 bug report at https://bugs.php.net/bug.php?id=70718&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=70718&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=70718&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=70718&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=70718&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=70718&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=70718&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=70718&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=70718&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=70718&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=70718&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=70718&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=70718&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=70718&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=70718&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=70718&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=70718&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=70718&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=70718&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=70718&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=70718&r=mysqlcfg



Thread (3 messages)

« previous php.bugs (#196619) next »