I would encourage you to set the timezone on that server in the php.ini file, to ensure the timestamps are accurate. Can you try replacing the CampaignService.get() call in the UseOAuth.php example with a report download request, and then run that on both servers?
Finally i got access from server to run command line example "UseOAuth.php".
Yes on both server it works fine, but on server where adhoc report is not working there i got php warning for date.
PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Calcutta' for 'IST/5.0/no DST' instead in /var/www/html/src/Google/Api/Ads/Common/Util/Logger.php on line 234
On Monday, June 4, 2012 11:27:57 PM UTC+5:30, Eric Koleda wrote:
Certainly a tricky problem. As a baseline, can you try running the command line example "UseOAuth.php" on both servers, to see if that works?
Are these new OAuth tokens or are you using the same token on both servers?
I am using same Oauth tokens for both servers.
Can you double check that you are using the same consumer key and secret on both servers?
Yes, I am using same consumer key and secret.
On Monday, June 4, 2012 7:11:25 PM UTC+5:30, Eric Koleda wrote:
I didn't see any problems or noticeable differences with the broken request. Are these new OAuth tokens or are you using the same token on both servers? Can you double check that you are using the same consumer key and secret on both servers?
On Friday, June 1, 2012 11:56:15 PM UTC+5:30, Eric Koleda wrote:
My apologies again, I was parsing it as milliseconds and not seconds. That does appear to be correct.
Regarding my other point, it would be helpful to compare the Authorization header from the server that is working with the one from the server that is not working. Can you post the sanitized version of both?
oauth_timestamp="1338338512" is refers to the Wed, 30 May 2012 00:41:52 GMT
What are the timestamps like for working requests?
I am not getting this. I am working with timezone 'Asia/Calcutta'.
On Friday, June 1, 2012 10:19:58 PM UTC+5:30, Eric Koleda wrote:
My apologies, I forgot this was for report downloads, so you should only get a log with the report request. For report requests the OAuth parameters are passed in the Authorization header. The value of the timestamp used seems to be wrong:
This corresponds to Fri Jan 16 1970 06:45:38 GMT-0500 (EST), which is not correct. What are the timestamps like for working requests?
Yes i will look into date and time suggestion you mentioned.
But,for logging, I have $user->LogAll(); is set.
but i am not getting any log. I just got logs for reporting and it is attached.
On Friday, June 1, 2012 9:37:09 PM UTC+5:30, Eric Koleda wrote:
It's strange that the error is only appearing on specific server environments. The next step in debugging this issue would be to take a look at the URL the SOAP request is being made to, since the PHP client library appends the OAuth parameters to the URL. If you enable SOAP XML logging the URL is recorded in the logs. Perhaps a visual inspection of the URL will show a difference between the environments.
One possible cause to investigate is whether the date and time is configured correctly on the server. When signing the OAuth parameters the current date/time is used, and if this is incorrect the AdWords API server may reject the request.
- Eric Koleda, AdWords API Team
On Friday, June 1, 2012 2:32:08 AM UTC-4, Chirag wrote:
Any update i am waiting for your reply otherwise i need to change server configuration from centOS to Ubuntu one.
Please note that i am using PHP client library.
On Monday, May 28, 2012 9:02:43 PM UTC+5:30, Danial Klimkin wrote:
Are you using any of our client libraries?
-Danial, AdWords API Team.
On Thursday, May 24, 2012 4:52:20 PM UTC+4, Chirag wrote:
Any special configuration required for Running OAuth 1.0a running succesfully?
I am trying to run one of my report download code, but it is giving error :