Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
L-ian9 opened this issue Apr 22, 2021 · 2 comments
Open

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

L-ian9 opened this issue Apr 22, 2021 · 2 comments

Comments

@L-ian9
Copy link

L-ian9 commented Apr 22, 2021

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
Copy link
Owner

brewlin commented Apr 23, 2021

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

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

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

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

确保环境正确

@L-ian9
Copy link
Author

L-ian9 commented Apr 23, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants