您好,欢迎访问一九零五行业门户网

php redis Uncaught exception 'RedisException' with message 'Redis server went a解决方案

php redis uncaught exception 'redisexception' with message 'redis server went a
php代码:
ini_set('default_socket_timeout', -1);
$redis = new redis();
$redis->connect(192.168.2.156,6379);  //php客户端设置的ip及端口
$redis->auth('123456');
//$redis->select(1);
$redis->set(say,hello world);
$data = $redis->get(say);     //应输出hello world
var_dump($data);
提示错误:fatal error: uncaught exception 'redisexception' with message 'redis server went away' in /usr/local/nginx/html/index.php:56 stack trace: #0 /usr/local/nginx/html/index.php(56): redis->auth('123456') #1 {main} thrown in /usr/local/nginx/html/index.php on line 56
redis服务打开了,防火墙也给关闭了,phpinfo里也看到了php的redis扩展,selinux不管设置成disabled还是permissive都不好用,真不知道是哪里出问题了,请高手指点
------解决思路----------------------
商刻的未来就看你了
其它类似信息

推荐信息