CURL ERROR 7 Failed to connect to Permission denied

APM 2017.07.25 08:25

“CURL ERROR 7 Failed to connect to Permission denied” error is caused, when for any reason curl request is blocked by some firewall or similar thing.

you will face this issue when ever the curl request is not with standard ports.

for example if you do curl to some URL which is on port 1234, you will face this issue where as URL with port 80 will give you results easily.

Most commonly this error has been seen on CentOS and any other OS with ‘SElinux’.

you need to either disable or change  ‘SElinux’ to permissive

1
nano /etc/selinux/config

locate following line

1
SELINUX=enforcing

Change this to

1
SELINUX=disabled

reboot is needed



SELINUX=disabled

출처: http://www.akashif.co.uk/php/curl-error-7-failed-to-connect-to-permission-denied



신고
Trackback 0 : Comment 0