brewlin / swoole-im

基于swoole开发的在线聊天平台,前端集成layerim框架,swoole基于eayswoole框架,异步连接池,多进程,异步任务,独立httperserver api,websocket推送,重构使用swoft-cloud 进行微服务架构
http://im.brewlin.com
142 stars 41 forks source link

php index.php start 启动失败,下面是最严重的错误 #7

Open L-ian9 opened 3 years ago

L-ian9 commented 3 years ago

Fatal error: Uncaught Error: Class 'EasySwoole\Core\Swoole\Coroutine\Redis' not found in /home/wwwroot/default/swoole-im-master/vendor/easyswoole/easyswoole/src/Core/Swoole/Coroutine/Client/Redis.php:30 Stack trace:

0 /home/wwwroot/default/swoole-im-master/App/Utility/RedisPool.php(25): EasySwoole\Core\Swoole\Coroutine\Client\Redis->__construct('127.0.0.1', 6379, false, NULL)

1 /home/wwwroot/default/swoole-im-master/vendor/easyswoole/easyswoole/src/Core/Swoole/Coroutine/AbstractInterface/CoroutinePool.php(29): App\Utility\RedisPool->createObject()

2 /home/wwwroot/default/swoole-im-master/vendor/easyswoole/easyswoole/src/Core/Swoole/Coroutine/PoolManager.php(75): EasySwoole\Core\Swoole\Coroutine\AbstractInterface\CoroutinePool->__construct(3, 10)

3 /home/wwwroot/default/swoole-im-master/vendor/easyswoole/easyswoole/src/Core/Swoole/Coroutine/PoolManager.php(110): EasySwoole\Core\Swoole\Coroutine\PoolManager->init('App\Utility\Red...')

4 /home/wwwroot/default/swoole-im-master/vendor/easyswoole/easyswoole/src/Core/Swoo in /home/wwwroot/default/swoole-im-master/vendor/easyswoole/easyswoole/src/Core/Swoole/Coroutine/Client/Redis.php on line 30

PHP Fatal error: Uncaught Error: Class 'EasySwoole\Core\Swoole\Coroutine\Redis' not found in /home/wwwroot/default/swoole-im-master/vendor/easyswoole/easyswoole/src/Core/Swoole/Coroutine/Client/Redis.php:30

brewlin commented 3 years ago

你好,根据你上面报错信息的实际代码错误是在这里

use \Swoole\Coroutine\Redis as SwooleRedis;
...
:30 $this->client = new SwooleRedis();

应该是你没有开启异步redis扩展

因为项目比较老,是采用swoole2.1.3+php7.1 构建的,swoole2里是需要主动开启异步扩展的

确保环境正确

L-ian9 commented 3 years ago

好的,谢谢您的回复,我在尝试以下!

------------------ 原始邮件 ------------------ 发件人: "brewlin/swoole-im" @.>; 发送时间: 2021年4月23日(星期五) 晚上6:14 @.>; @.**@.>; 主题: Re: [brewlin/swoole-im] php index.php start 启动失败,下面是最严重的错误 (#7)

你好,根据你上面报错信息的实际代码错误是在这里 use \Swoole\Coroutine\Redis as SwooleRedis; ... :30 $this->client = new SwooleRedis();
应该是你没有开启异步redis扩展

因为项目比较老,是采用swoole2.1.3+php7.1 构建的,swoole2里是需要主动开启异步扩展的

确保环境正确

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.