phpredis无法连接到127.0.0.1:6379

Below is error info:

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

But actually when using redis-cli to connect 127.0.0.1:6379, it still works. phpredis was cloned form GitHub with master branches, local phpversion is 5.4.

Thanks!

1个回答



最后我发现了问题:</ p>

setenforce 0 < / em> </ strong> </ p>

我不知道为什么,但它确实有效!</ p>

可能对你们有帮助...... </ p>
</ div>

展开原文

原文

finally I've found the problem :

setenforce 0

I don't know why , but it works!

may helpful to u guys...

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问