Hi Rizwan, This problem has to do with the precision of floats in PHP. More information is available here:
http://code.google.com/p/google-api-adwords-php/issues/detail?id=18&can=1 The recommended solution is to use the round() function on the CPC value after you multiply it. Best, - Eric Koleda, AdWords API Team On Apr 18, 8:43 am, rizi <rizim...@gmail.com> wrote: > All, > > We have updated our site to use the Google Adwords API v200909 > recently. We use a cron job script to update the bids regularly. A > couple of times we saw that the update bid function has failed with > the following exception: > > Fatal error: Uncaught SoapFault exception: [soap:Server] > [BiddingError.BID_TOO_MANY_FRACTIONAL_DIGITS @ > operations[0].operand.bids.maxCpc.amount.microAmount] in /public_html/ > backend/aw_api_php_lib_2.0.0_src/src/Google/Api/Ads/Common/Lib/ > AdsSoapClient.php:177 Stack trace: #0 /public_html/backend/ > aw_api_php_lib_2.0.0_src/src/Google/Api/Ads/Common/Lib/ > AdsSoapClient.php(177): SoapClient->__soapCall('mutate', Array, NULL, > Array, Array) #1 /public_html/backend/aw_api_php_lib_2.0.0_src/src/ > Google/Api/Ads/AdWords/v200909/cm/AdGroupCriterionService.php(4435): > AdsSoapClient->__soapCall('mutate', Array) #2 /public_html/backend/ > backend_main.php(382): AdGroupCriterionService->mutate(Array) #3 / > public_html/backend/backend_main.php(257): > set_new_bid(Object(AdGroupCriterionService), 398589821, 51498600, > 2.01) #4 /public_html/backend/backend_main.php(390): backendMain() #5 > {main} thrown in /public_html/backend/aw_api_php_lib_2.0.0_src/src/ > Google/Api/Ads/Common/Lib/AdsSoapClient.php on line 177 > > Since the exception was uncaught, our script had failed to proceed. I > see that this was not the first keyword that we were trying to update, > so we figured that the problem was with the value we were passing. So, > I updated my script to print the value that we are passing to the > Money function:$bids->maxCpc = new Bid(new Money(($newBid*1000000))); > and catch the exception. The results are strange, we see that all bids > except the value "2010000" have been successful. All bids with > microAmount "2010000" have failed with > BiddingError.BID_TOO_MANY_FRACTIONAL_DIGITS error. Is this a known > issue? > > It does look strange but I have seen 5 instances of this in my single > run. And it is persistent. I am yet to test this in Sandbox to see if > it happens. I have verified (by printing the whole bids Array) that > the printed value is infact converted to Money object correctly. Can > someone kindly throw light on what is the problem here? > > Thanks for your time! > > Regards > Rizwan M > > -- > =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ > Have you migrated to v200909 yet? > The v13 sunset is on April 22, 2010. > > Also find us on our blog and discussion > group:http://adwordsapi.blogspot.comhttp://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 adwords-api@googlegroups.com > To unsubscribe from this group, send email to > adwords-api+unsubscr...@googlegroups.com > For more options, visit this group > athttp://groups.google.com/group/adwords-api?hl=en -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Have you migrated to v200909 yet? The v13 sunset is on April 22, 2010. 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 adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en