菜单 学习猿地 - LMONKEY

VIP

开通学习猿地VIP

尊享10项VIP特权 持续新增

知识通关挑战

打卡带练!告别无效练习

接私单赚外块

VIP优先接,累计金额超百万

学习猿地私房课免费学

大厂实战课仅对VIP开放

你的一对一导师

每月可免费咨询大牛30次

领取更多软件工程师实用特权

入驻
58
0

laravel集成workerman,使用异步mysql,redis组件时,报错EventBaseConfig::FEATURE_FDS not supported on Windows

原创
05/13 14:22
阅读数 79440

由于laravel项目中集成了workerman,因业务需要,需要使用异步的mysql和redis组件。

composer require react/mysql
composer require clue/redis-react

安装完成后,直接导致workerman无法启动,并报错。

EventException  : EventBase cannot be constructed with the provided configura
tion. Make sure that the specified features are supported on the current platform.

然后一顿百度,google,发现在github上有人已经提交了bug。

https://github.com/reactphp/event-loop/pull/192

说明在windows下不支持 EventBaseConfig::FEATURE_FDS。

 

解决方法:

在 vendor/react/event-loop/src/ExtEventLoop.php 文件 48 行,加上判断。

if ('WIN' !== strtoupper(substr(PHP_OS, 0, 3))) {
    $config->requireFeatures(EventBaseConfig::FEATURE_FDS);
}

  

发表评论

0/200
58 点赞
0 评论
收藏
为你推荐 换一批