Error connecting to Google Adwords through APIlity after killing script. Why?
I have to use the Google APIlity client (through v13) to access account information. If I am running the script I wrote and I kill it on the command line using CTRL+C, I get an error when I try to access the API using:
$apilityUser->getManagersClientAccounts()
Any Ideas?
require_once('apility/apility.php');
$apilityUser = new APIlityUser(
$email,
$password,
$client_email,
$developer_token,
$application_token
);
# get all of the accounts (IT DIES HERE)
if(!$emailAccounts = $a开发者_如何转开发pilityUser->getManagersClientAccounts()){
fwrite($STDERR, '** ERROR ** There was an error while trying to connect to the partner!'."\n");
fclose($STDERR);
exit;
}
It turns out when the script is stopped, if it is caching the WSDL, it leaves the cached WSDL in the cache folder. When I remove the cached WSDL, it allows me to connect again. I finally discovered the resolution and figured I would post it here in case someone else runs into the same problem.
精彩评论