Closed GoogleCodeExporter closed 8 years ago
Thank you for reporting this. Which version of the library and which version
of PHP
are you using? Can you also include a snippet of your code that creates the
objects
makes this request?
Best,
- Eric Koleda, AdWords API Team
Original comment by adwordsa...@google.com
on 8 Dec 2009 at 5:22
Thanks for the quick response Eric!
I am running 1.2.0 of the library and PHP 5.2.
while ($row = mysql_fetch_assoc($result)) {
// Create ad params.
$adParam1 = new AdParam($row['adgroup_id'], $row['criterion_id'], "$" .
round($row['price'], 0), 1);
$operations = array(new AdParamOperation($adParam1, 'SET'));
// Set ad params.
$adParam = $adParamService->mutate($operations);
//die(print_r($adParam));
}
Original comment by ryanbant...@gtempaccount.com
on 8 Dec 2009 at 5:32
In testing we've found that the different versions of PHP 5.2 behave very
differently.
Which specific build of PHP are you using?
Original comment by adwordsa...@google.com
on 8 Dec 2009 at 5:59
5.2.10-2ubuntu6.3
Original comment by ryanbant...@gtempaccount.com
on 8 Dec 2009 at 6:01
Hello Eric,
I was able to get my script working. It looks like some how the library was
interpreting as an integer and couldn't handle that large of a number. I cast
the
criterionid as a float and everything appears to work now. I have included the
updated line below.
$adParam1 = new AdParam($row['adgroup_id'], (float) $row['criterion_id'], "$" .
round($row['price'], 0), 1);
-Ryan Bantz
MRB Networks
Original comment by ryanbant...@gtempaccount.com
on 8 Dec 2009 at 10:12
Hi Ryan,
Thanks for the feedback. From the initial research it seemed to be an integer
conversion issue, and I'm glad casting as a float solved the issue. We will
investigate this further to determine if changes can be made to the client
library to
prevent this in the future.
Best,
- Eric
Original comment by adwordsa...@google.com
on 9 Dec 2009 at 2:48
Original comment by api.ekol...@gmail.com
on 9 Dec 2009 at 11:38
Original comment by api.ekol...@gmail.com
on 17 Dec 2009 at 9:00
Issue 10 has been merged into this issue.
Original comment by api.ekol...@gmail.com
on 4 Jan 2010 at 6:05
Issue 17 has been merged into this issue.
Original comment by api.ekol...@gmail.com
on 17 Mar 2010 at 1:53
i have same problem. how can i fix. i tried "check clienEmail", "(float)
criterionId", "reenter keywords"
Original comment by akar...@gmail.com
on 29 Jun 2010 at 4:28
Hi,
Explicitly casting your ID to a float before passing it into the service
usually fixes the issue. What version of PHP are you using?
- Eric
Original comment by api.ekol...@gmail.com
on 29 Jun 2010 at 5:42
Hi,
PHP Version is 5.2.9
i tryed convert id to float but cant fix problem.
below listing group and criterion ids.
Ad group criterion with ad group id "1545265232", criterion id "5304064465, and
type "Keyword" was found.
Ad group criterion with ad group id "1545265232", criterion id "11350382259,
and type "Keyword" was found.
this one is run no problem.
$adGroupId = (float) '1545265232';
$criterionId = (float) '5304064465';
$adParam1 = new AdParam($adGroupId, $criterionId, '66.30', 1);
but this one is not.
$adGroupId = (float) '1545265232';
$criterionId = (float) '11350382259';
$adParam1 = new AdParam($adGroupId, $criterionId, '66.30', 1);
and gives INVALID_ADGROUP_CRITERION_SPECIFIED.
first keyword's id 10 digits second one 11 digits.
thank you.
Original comment by akar...@gmail.com
on 30 Jun 2010 at 7:47
hi,
2 days and no answer. please help.
Original comment by akar...@gmail.com
on 2 Jul 2010 at 7:45
Can you post the SOAP XML request and response? From looking at the logs it
appears that the values are being passed correctly, and that the server
believes that this ad group and criterion pairing is invalid.
Original comment by api.ekol...@gmail.com
on 2 Jul 2010 at 4:06
Hello,
Thank you for answer.
Problem fixed.
The problem was using one more client accounts for keywords.
We solved problem by creating a new campaign and we recreated new adgroups and
keywords using one client account. Now I can set ad param for all keywords.
Original comment by akar...@gmail.com
on 2 Jul 2010 at 4:38
likely related when Estimated daily cost is sometimes larger than an int for
example running the example code GetTrafficEstimates.php on cars produces the
following output:
Results for the keyword with text 'cars' and match type 'BROAD':
Estimated average CPC: 735551
Estimated ad position: 2.44
Estimated daily clicks: 73
Estimated daily cost: 56066670
Results for the keyword with text 'cars' and match type 'PHRASE':
Estimated average CPC: 737858
Estimated ad position: 2.50
Estimated daily clicks: 9462
Estimated daily cost: -1388161792
Results for the keyword with text 'cars' and match type 'EXACT':
Estimated average CPC: 811483
Estimated ad position: 3.04
Estimated daily clicks: 340
Estimated daily cost: 283101864
Original comment by webpag...@gmail.com
on 30 Nov 2010 at 10:18
In that case the problem could be just the display. If you change the printf()
string to use %f or %s does it output the correct number?
printf(" Estimated daily cost: %f\n\n", $meanTotalCost);
Original comment by api.ekol...@gmail.com
on 30 Nov 2010 at 10:41
That was the problem, thank you for your help.
Original comment by webpag...@gmail.com
on 1 Dec 2010 at 6:14
I'll update the examples to use %.0f for long values.
Original comment by api.ekol...@gmail.com
on 1 Dec 2010 at 7:37
Original comment by ekoleda+devrel@googlers.com
on 11 Apr 2011 at 8:30
Issue 55 has been merged into this issue.
Original comment by ekoleda+devrel@googlers.com
on 11 Apr 2011 at 8:31
Original issue reported on code.google.com by
ryanbant...@gtempaccount.com
on 8 Dec 2009 at 5:14Attachments: