我在安装 phpredis 时遇到了一个棘手的问题
cd phpredis && ./configure && make && make install
之后,我添加
extension=redis.so
进入 php.ini。
我可以通过运行得到一个 OK
php -r "if (new Redis() == true){ echo \"\r\n OK \r\n\"; }"
但是在运行 http:127.0.0.1 时,nginx 抛出错误“致命错误:在 index.php 中找不到类 'Redis'”
<?php>
$client = new Redis();
<?>
我想这可能是与环境有关的一些问题......
感谢您的任何建议!