phpredis无法连接到127.0.0.1:6379
以下是错误信息:phpredis无法连接到127.0.0.1:6379,php,redis,Php,Redis,以下是错误信息: Fatal error: Uncaught exception 'RedisException' with message 'Can't connect to 127.0.0.1:6379' in /var/www/html/index.php:3 Stack trace: #0 /var/www/html/index.php(3): Redis->connect('127.0.0.1', 6379) #1 {main} thrown in /var/www/html/i
Fatal error: Uncaught exception 'RedisException' with message 'Can't connect to 127.0.0.1:6379' in /var/www/html/index.php:3 Stack trace:
#0 /var/www/html/index.php(3): Redis->connect('127.0.0.1', 6379) #1 {main} thrown in /var/www/html/index.php on line 3
但实际上,当使用redis cli连接127.0.0.1:6379时,它仍然可以工作。
phpredis是从带有主分支的GitHub克隆的,本地phpversion为5.4
谢谢 我终于找到了问题: 设置强制执行0 我不知道为什么,但它起作用了 也许对你们有帮助