If you meet with this such problem the best way is to upgrade PHP and
libcurl to latest versions. If you can't do this, you can apply next fix:
file: src/Google/Api/Ads/Common/Util/AuthToken,php,
function Login()
add below:
curl_setopt($ch, CURLOPT_POSTFIELDS, $postVars);
next strings:
if (defined('CURLOPT_IPRESOLVE') && defined('CURL_IPRESOLVE_V4')) {
curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
} else {
curl_setopt($ch, CURLOPT_URL, str_replace('accounts.google.com',
'74.125.127.84', $postUrl));
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Host:
accounts.google.com'));
}
Some explanation how it works: we're change hostname to IP address in URI
to prevent cURL perform DNS lookup.
But we need somehow to specify which host we're requesting for, so we're
adding manually our end Host in HTTP Header.
This is not best practice, but gives you time to keep your scripts working
till you didn't find way to upgrade PHP or move to other server.
Regards,
Evgeniy.
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en