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.
source: https://stackoverflow.com/questions/8765848/troubleshooting-permission-denied-when-attempting-to-connect-to-redis-from-php