Reputation: 568
I am installing on my web space the Google API PHP client (2.1.0) and following this tutorial. The problem is when I go to HelloAnalytics.php
I have a PHP error:
Fatal error: Uncaught exception 'GuzzleHttp\Ring\Exception\ConnectException' with message 'cURL error 6: See http://curl.haxx.se/libcurl/c/libcurl-errors.html' in /reporting_com/google-api-php-client-2.1.0_PHP54/vendor/guzzlehttp/ringphp/src/Client/CurlFactory.php:126 Stack trace: #0 /reporting_com/google-api-php-client-2.1.0_PHP54/vendor/guzzlehttp/ringphp/src/Client/CurlFactory.php(91): GuzzleHttp\Ring\Client\CurlFactory::createErrorResponse(Object(GuzzleHttp\Ring\Client\CurlMultiHandler), Array, Array) #1 /reporting_com/google-api-php-client-2.1.0_PHP54/vendor/guzzlehttp/ringphp/src/Client/CurlMultiHandler.php(244): GuzzleHttp\Ring\Client\CurlFactory::createResponse(Object(GuzzleHttp\Ring\Client\CurlMultiHandler), Array, Array, Array, Resource id #128) #2 /share/src_serv-prd in /reporting_com/google-api-php-client-2.1.0_PHP54/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php on line 49
The 6th error on the libcurl-errors.html page of GuzzleHttp website say :
CURLE_COULDNT_RESOLVE_HOST (6) Couldn't resolve host. The given remote host was not resolved.
And that seems legit: I am on my company network which blocks every curl host. I have to say to my sysadmin to unlock this host in order to allow Curl to work but I don't manage to find the URL host.
What is it?
Upvotes: 2
Views: 1329
Reputation: 129
To continue other request you can set options http_errors to false:
$option = [
....
'http_errors' => false,
...
];
Upvotes: 0