在thinkPHP5.0已安装redis扩展的情况下,在onMessage中调用redis报错

冰麒麟

在thinkPHP5.0已安装redis扩展,但是报 Class 'Redis' not found in D:\xampp\htdocs\workermanTest\application\index\controller\Worker.php:41不在worker的代码中使用redis是好使的。
部分代码如下:

[attach]2188[/attach]
 

3076 1 0
1个回答

blogdaren

不在worker代码中? 那应该你使用的是非PHP-CLI 环境的redis,   workerman是工作在 PHP-CLI 模式下的,必须安装PHP-CLI环境的redis扩展,这么来校验:
【linux】 /path/to/php  -m |  grep -i redis 
【windows】\path\to\php -m  | findstr redis

  • 暂无评论
年代过于久远,无法发表回答
🔝