PHP Code:
Ini_set (' Default_socket_timeout ',-1);
$redis = new Redis ();
$redis->connect ("192.168.2.156", "6379"); IP and port set by PHP client
$redis->auth (' 123456 ');
$redis->select (1);
$redis->set ("Say", "Hello World");
$data = $redis->get ("say"); Should output Hello World
Var_dump ($data);
Hint Error: 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: Redis->auth (' 123456 ') #1 {main} thrown in/usr/local/ nginx/html/index.php on line 56
Redis Service opened, the firewall is also closed, Phpinfo also see the php redis extension, SELinux regardless of set to disabled or permissive are not good use, really do not know where the problem, please master pointing
Reply to discussion (solution)
Problem solved, someone sent a knot paste!
The future of business is in your sight.
The future of business is in your sight.
That's right, your answer I am very satisfied!!!