Fresh installation of redis, out of the box and it doesn’t work.
Never had this issue on Ubuntu ..
Warning: Redis::connect(): connect() failed: Permission denied in /var/www/vhosts/xxx/httpdocs/_/_.redis.php on line 12
We need to enable httpd to use redis’ default port 6379:
yum install policycoreutils-python
semanage port -m -t http_port_t -p tcp 6379
semanage port -l | egrep '(^http_port_t|6379)'
http_port_t tcp 6379, 80, 81, 443, 488, 8008, 8009, 8443, 9000
redis_port_t tcp 6379
No need to restart redis or httpd after this, it should work right away.