PhpredisUncaughtexceptionRedisExceptionwithmessageRedisserverwenta php code:
Ini_set ('default _ socket_timeout ',-1 );
$ Redis = new Redis ();
$ Redis-> connect ("192.168.2.156", "6379"); // ip address and port set by the php client
$ Redis-> auth ('123 ');
// $ Redis-> select (1 );
$ Redis-> set ("say", "Hello World ");
$ Data = $ redis-> get ("say"); // output Hello World
Var_dump ($ data );
Error message: 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 ('20140901') #1 {main} thrown in/usr/local/nginx/html/index. php on line 56
The redis service is turned on, and the firewall is closed. phpinfo also shows the redis extension of php. selinux is not useful no matter whether it is set to disabled or permissive. I really don't know what went wrong, expert advice
Reply to discussion (solution)
The problem has been solved, and people will post points!
The future of commerce depends on you.
The future of commerce depends on you.
That's right. I'm very satisfied with your answer !!!