Repository navigation
Description
If I use https://pecl.php.net/package/event library on Windows then I got following error out of the box
PHP Warning: EventBase::__construct(): event_base_new_with_config: no event mechanism available
After small investigation I found that if following line commented then all works as expected
https://github.com/reactphp/event-loop/blob/master/src/ExtEventLoop.php#L47
$config->requireFeatures(EventBaseConfig::FEATURE_FDS);
Examples
Server: https://github.com/inri13666/web-socket-echoserver
Client: https://github.com/inri13666/web-socket-test
Library Info
composer show | grep loop
react/event-loop v1.1.0 ReactPHP's core reactor event loop that libraries can use for evented I/O.
Environment
systeminfo | findstr /B /C:"OS Version" /C:"System Type" /C:"System Locale"
| OS Version: | 10.0.17763 N/A Build 17763 |
| System Type: | x64-based PC |
| System Locale: | en-us;English (United States) |
php -i | findstr /B /C:"PHP Version" /C:"Architecture" /C:"Compiler" /C:"Configure Command" /C:"Zend Extension Build"
| PHP Version | 7.1.26 |
| Compiler | MSVC14 (Visual C++ 2015) |
| Architecture | x64 |
| Zend Extension Build | API320160303,TS,VC14 |
Configure Command: cscript /nologo configure.js "--enable-snapshot-build" "--enable-debug-pack" "--with-pdo-oci=c:\php-snap-build\deps_aux\oracle\x64\instantclient_12_1\sdk,shared" "--with-oci8-12c=c:\php-snap-build\deps_aux\oracle\x64\instantclient_12_1\sdk,shared" "--enable-object-out-dir=../obj/" "--enable-com-dotnet=shared" "--with-mcrypt=static" "--without-analyzer" "--with-pgo"
PHP Extensions
php -m
[PHP Modules]
bcmath
bz2
calendar
com_dotnet
Core
ctype
curl
date
dom
event <====
exif
fileinfo
filter
gd
hash
iconv
intl
json
ldap
libxml
mbstring
mcrypt
memcache
mysqli
mysqlnd
openssl
pcre
PDO
pdo_mysql
pdo_pgsql
pdo_sqlite
pdo_sqlsrv
pgsql
Phar
readline
Reflection
session
SimpleXML
soap
sockets
SPL
sqlsrv
standard
tokenizer
wddx
xdebug
xml
xmlreader
xmlrpc
xmlwriter
xsl
zip
zlib
[Zend Modules]
Xdebug
Activity
clue commentedon Apr 17, 2019
@inri13666 Thanks for reporting and providing the platform info, it looks like this might in fact be a bug on Windows with
ext-event.Can you verify this by running the test suite and showing its output prior to your change and with your change applied? If this fixes the problem, a simple PR with your changes would be much appreciated!
inri13666 commentedon Apr 18, 2019
Actual
master's phpunit results on Windows platformphpunit-master.txt
If I commented out mentioned line
phpunit-patch.txt
Later I'll prepare PR for this error
EventBase::__construct(): event_base_new_with_config: no event mechanism availableBut right now I'm not sure how to fix on windows
It would be nice to have test builds for windows hosts for example here https://www.appveyor.com/
It's Free for open-source projects https://www.appveyor.com/pricing/
Library issue https://bitbucket.org/osmanov/pecl-event/issues/53/eventbaseconfig-feature_fds-not-supported
clue commentedon Dec 23, 2019
@inri13666 Thank you for your patience, I've tried to reproduce this locally but have been unable to get
ext-eventrunning on Windows so far. Can you provide some instructions on how to best reproduce your setup on a clean Windows 10 installation so I can look into providing an automated test setup for this project?The unrelated build error regarding timers is going to be fixed via #203.
inri13666 commentedon Dec 24, 2019
The DLL can be downloaded here https://pecl.php.net/package/event
I have tested it with following extension version
PHP version
Full info here https://gist.github.com/inri13666/1e8d4e60ede974b97f86ed64a1fdb0e1
clue commentedon Dec 24, 2019
@inri13666 Thank you, I've been able to reproduce this locally with the help of @sitedyno (
ext-eventneeds to be loaded afterext-sockets) and have prepared a PR to add an automated test on Windows and fix this issue. Expect this PR soon, this is currently waiting for #203/#204 first 👍