Troubleshooting “Permission denied” when attempting to connect to Redis from PHP script

前端 未结 1 681
陌清茗
陌清茗 2021-01-31 05:31

Port 6379 is open on the server, and I can successfully run telnet localhost 6379 in SSH.

I tried both Predis/phpredis client library in PHP, but it still d

相关标签:
1条回答
  • 2021-01-31 05:48

    Problem solved, type:

    /usr/sbin/setsebool httpd_can_network_connect=1
    

    By default, SELinux does not allow Apache to make socket connections. More information can be found here.

    0 讨论(0)
提交回复
热议问题