cURL works via command line but not in PHP Curl
Running a curl request from my browser based PHP script failed after I broke my etc/resolv.conf file.
I discovered this after visiting
php5-curl error: couldn't resolve host
After fixing the resolve.conf file as follows:(note: 192.168.1.1 is my router address)
# Generated by NetworkManagernameserver 192.168.1.1
Curl behaved as expected.
I Hope it helps you