


php redis Uncaught exception 'RedisException' with message 'Redis server went a解决方案
Jun 13, 2016 pm 12:16 PM
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都不好用,真不知道是哪里出问题了,请高手指点
------解决思路----------------------
商刻的未来就看你了

인기 기사

인기 기사

뜨거운 기사 태그

메모장++7.3.1
사용하기 쉬운 무료 코드 편집기

SublimeText3 중국어 버전
중국어 버전, 사용하기 매우 쉽습니다.

스튜디오 13.0.1 보내기
강력한 PHP 통합 개발 환경

드림위버 CS6
시각적 웹 개발 도구

SublimeText3 Mac 버전
신 수준의 코드 편집 소프트웨어(SublimeText3)

뜨거운 주제











Ubuntu 및 Debian용 PHP 8.4 설치 및 업그레이드 가이드

PHP 개발을 위해 Visual Studio Code(VS Code)를 설정하는 방법
