【发布时间】:2014-10-03 12:30:43
【问题描述】:
我已经在我的 ubuntu 14 服务器上安装了带有 phpredis 扩展的 Redis。我正在使用 Nginx 服务器。我有php测试脚本
$redis=new Redis() or die("Cannot load Redis module.");
$redis->connect('localhost');
$redis->set('random', rand(5000,6000));
echo $redis->get('random');
从命令行可以正常工作,但不能通过网络浏览器。
Nginx 错误日志:
[info] 31102#0: Using 32768KiB of shared memory for push module in /etc/nginx/nginx.conf:82
[error] 31108#0: *21 FastCGI sent in stderr: "PHP message: PHP Fatal error: Class 'Redis' not found in...
我在phpinfo()也看不到
全部使用 apt-get install 安装
所有其他模块(mysql、imagemagick...)工作正常
我在谷歌上花了几个小时,但没有发现任何有用的东西
【问题讨论】: