I'm still fighting with that proxy config and I would like to ask for your opinion. I have disabled IPv6 on a server and now I got a different error, without IPv6 address cURL error 7: Failed connect to www.googleapis.com:443; Operation now in progress.
. Infrastructure owner says I don't use proxy properly, but the only option I have is to configure lib. I did run an example GetCampaigns
with and without proxy configured and I have different curl errors. I made sure that proper config file is used. Lib example was run outside any application.
Is it possible that GoogleAds lib somehow ignores proxy config?
Running requests with curl from Linux console pass proxy just fine.
Here is the output with and then without proxy configured:
[us...@server.com examples]$ php -f AdWords/v201705/BasicOperations/GetCampaigns.php --no-chdir
PHP Fatal error: Uncaught exception 'GuzzleHttp\Exception\ConnectException' with message 'cURL error 7: Failed connect to www.googleapis.com:443; Operation now in progress (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)' in /home/user/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:186
Stack trace:
#0 /home/user/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php(150): GuzzleHttp\Handler\CurlFactory::createRejection(Object(GuzzleHttp\Handler\EasyHandle), Array)
#1 /home/user/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php(103): GuzzleHttp\Handler\CurlFactory::finishError(Object(GuzzleHttp\Handler\CurlHandler), Object(GuzzleHttp\Handler\EasyHandle), Object(GuzzleHttp\Handler\CurlFactory))
#2 /home/user/vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php(43): GuzzleHttp\Handler\CurlFactory::finish(Object(GuzzleHttp\Handler\CurlHandler), Object(GuzzleHttp\Handler\EasyHandle), Object(GuzzleHttp\Handler\CurlFactory))
#3 /home/wg in /home/user/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php on line 186
[us...@server.com examples]$ vi ~/adsapi_php.ini //disabling proxy config
[us...@server.com examples]$ php -f AdWords/v201705/BasicOperations/GetCampaigns.php --no-chdir
PHP Fatal error: SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://adwords.google.com/api/adwords/cm/v201705/CampaignService?wsdl' : failed to load external entity "https://adwords.google.com/api/adwords/cm/v201705/CampaignService?wsdl"
in /home/user/vendor/googleads/googleads-php-lib/src/Google/AdsApi/Common/AdsSoapClient.php on line 65
PHP Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://adwords.google.com/api/adwords/cm/v201705/CampaignService?wsdl' : failed to load external entity "https://adwords.google.com/api/adwords/cm/v201705/CampaignService?wsdl"
in /home/user/vendor/googleads/googleads-php-lib/src/Google/AdsApi/Common/AdsSoapClient.php:65
Stack trace:
#0 /home/user/vendor/googleads/googleads-php-lib/src/Google/AdsApi/Common/AdsSoapClient.php(65): SoapClient->SoapClient('https://adwords...', Array)
#1 /home/user/vendor/googleads/googleads-php-lib/src/Google/AdsApi/AdWords/v201705/cm/CampaignService.php(145): Google\AdsApi\Common\AdsSoapClient->__construct('https://adwords...', Array)
#2 [internal function]: Google\AdsApi\AdWords\v201705\cm\CampaignService->__construct(Array)
#3 /home/user/vendor/googleads/googleads-php-lib/src/Google/AdsApi/Common/Util/Reflection.php(39): ReflectionClass->newInstanceArgs(Array)
in /home/user/vendor/googleads/googleads-php-lib/src/Google/AdsApi/Common/AdsSoapClient.php on line 65