We have been using the same script and configuration from many months and it was working fine. Suddenly the curl started failing a few hours back with the error that could not reoslve host. I tested the host with postman and it works. Also I changed the host to google.com but getting the same error.
Didn't change any machine or server configuration overnight.
Any pointers .. it is a production stop for us.
here is error log from curl
array(26) {
["url"]=>
string(37) "https://google.com/callback/abcd"
["content_type"]=>
NULL
["http_code"]=>
int(0)
["header_size"]=>
int(0)
["request_size"]=>
int(0)
["filetime"]=>
int(-1)
["ssl_verify_result"]=>
int(0)
["redirect_count"]=>
int(0)
["total_time"]=>
float(0.000121)
["namelookup_time"]=>
float(0)
["connect_time"]=>
float(0)
["pretransfer_time"]=>
float(0)
["size_upload"]=>
float(0)
["size_download"]=>
float(0)
["speed_download"]=>
float(0)
["speed_upload"]=>
float(0)
["download_content_length"]=>
float(-1)
["upload_content_length"]=>
float(-1)
["starttransfer_time"]=>
float(0)
["redirect_time"]=>
float(0)
["redirect_url"]=>
string(0) ""
["primary_ip"]=>
string(0) ""
["certinfo"]=>
array(0) {
}
["primary_port"]=>
int(0)
["local_ip"]=>
string(0) ""
["local_port"]=>
int(0)
}
string(34) "Could not resolve host: google.com"
I have tried restarting apache2 as well as my PHP-FHM. Nothing helped.