Google Ads Php client API v15 for php oauth isuue

104 views
Skip to first unread message

Zahra Ahmed

unread,
Feb 7, 2024, 1:41:49 AM2/7/24
to Google Ads API and AdWords API Forum
please help me in this
i am facing this issue in google ads php client api
Fatal error</b>:  Uncaught Error: Call to undefined function Google\Ads\GoogleAds\Lib\parse_ini_file() in /var/www/vhosts/.../adwords/src/Google/Ads/GoogleAds/Lib/ConfigurationLoader.php:82
Stack trace:
#0 /var/www/vhosts/.../adwords/src/Google/Ads/GoogleAds/Lib/AbstractGoogleAdsBuilder.php(57): Google\Ads\GoogleAds\Lib\ConfigurationLoader-&gt;fromFile()
#1 /var/www/vhosts/.../adwords/examples/BasicOperations/ManualPauseResumeByArea.php(294): Google\Ads\GoogleAds\Lib\AbstractGoogleAdsBuilder-&gt;fromFile()
#2 /var/www/vhosts/.../adwords/examples/BasicOperations/ManualPauseResumeByArea.php(330): Google\Ads\GoogleAds\Examples\BasicOperations\UpdateCampaign::main()
#3 {main}
  thrown in <b>/var/www/vhosts/.../adwords/src/Google/Ads/GoogleAds/Lib/ConfigurationLoader.php</b> on line <b>82</b><br />

Google Ads API Forum Advisor

unread,
Feb 7, 2024, 3:42:23 AM2/7/24
to phedraad...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for reaching out to the Google Ads API support team.

After reviewing your concern, I understand that you are facing issues while using PHP client library in the Google Ads API.

In order to assist you further, could you provide us with more context of your concern?. Also, please provide us the complete API logs (request and response with request-id and request header) generated at your end.

If you are using a client library and haven't enabled the logging yet, I would request you to enable logging for the specific client library that you are using. You can refer to the guides Java.NetPHPPythonRuby or Perl to enable logging at your end. For REST interface requests, you can enable logging via the curl command by using the -i flag.

You can send the details via Reply privately to the author option, or direct private reply to this email.

This message is in relation to case "ref:!00D1U01174p.!5004Q02rytcl:ref"

Thanks,
 
Google Logo Google Ads API Team


Zahra Ahmed

unread,
Feb 7, 2024, 5:49:00 AM2/7/24
to Google Ads API and AdWords API Forum
i upgrade the php client libray v13 to v15 
i chnaged the metadata
, src, and vendor folder and upadte the path in examples/BasicOperations/UpdateCampaign need to something extra for this 
and upgrade the php version to 8.1.27

Zahra Ahmed

unread,
Feb 7, 2024, 7:07:38 AM2/7/24
to Google Ads API and AdWords API Forum
on BasicOperations/GetCampaigns.php
facing the issue 
Deprecated: Return type of GetOpt\GetOpt::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/vhosts/phedratech.com/adwords/vendor/ulrichsg/getopt-php/src/GetOpt.php on line 583

Deprecated: Return type of GetOpt\GetOpt::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/vhosts/phedratech.com/adwords/vendor/ulrichsg/getopt-php/src/GetOpt.php on line 529

Deprecated: Return type of GetOpt\GetOpt::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/vhosts/phedratech.com/adwords/vendor/ulrichsg/getopt-php/src/GetOpt.php on line 545

Deprecated: Return type of GetOpt\GetOpt::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/vhosts/phedratech.com/adwords/vendor/ulrichsg/getopt-php/src/GetOpt.php on line 561

Deprecated: Return type of GetOpt\GetOpt::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/vhosts/phedratech.com/adwords/vendor/ulrichsg/getopt-php/src/GetOpt.php on line 572

Deprecated: Return type of GetOpt\GetOpt::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/vhosts/phedratech.com/adwords/vendor/ulrichsg/getopt-php/src/GetOpt.php on line 509

Fatal error: Uncaught Error: Call to undefined function Google\Ads\GoogleAds\Lib\parse_ini_file() in /var/www/vhosts/phedratech.com/adwords/src/Google/Ads/GoogleAds/Lib/ConfigurationLoader.php:82 Stack trace: #0 /var/www/vhosts/phedratech.com/adwords/src/Google/Ads/GoogleAds/Lib/AbstractGoogleAdsBuilder.php(57): Google\Ads\GoogleAds\Lib\ConfigurationLoader->fromFile() #1 /var/www/vhosts/phedratech.com/adwords/examples/BasicOperations/GetCampaigns.php(51): Google\Ads\GoogleAds\Lib\AbstractGoogleAdsBuilder->fromFile() #2 /var/www/vhosts/phedratech.com/adwords/examples/BasicOperations/GetCampaigns.php(131): Google\Ads\GoogleAds\Examples\BasicOperations\GetCampaigns::main() #3 {main} thrown in /var/www/vhosts/phedratech.com/adwords/src/Google/Ads/GoogleAds/Lib/ConfigurationLoader.php on line 82

Google Ads API Forum Advisor

unread,
Feb 7, 2024, 11:14:28 AM2/7/24
to phedraad...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for getting back to us. 

Kindly note that you have not provided the logs in the format which we have requested. As you are facing PHP OAuth related issues, could you kindly confirm if you have followed this "OAuth Desktop and Web Application Flows" guide? If not, I would recommend you to kindly refer to the above guide. As you are using PHP to get the campaigns, I would recommend you to kindly refer to this PHP sample code to retrieve the information. 

As requested earlier, kindly provide us with the complete API logs (request and response logs with request-id and request header) generated at your end and uncropped UI screenshot of the Google Ads account where you are facing the issue.

If you are using a client library and haven't enabled the logging yet, I would request you to enable logging for the specific client library that you are using. You can refer to the guides in PHP to enable logging at your end. For REST interface requests, you can enable logging via the curl command by using the -i flag.
Reply all
Reply to author
Forward
0 new messages