Fatal error: Call to undefined function Google\AdsApi\AdWords\boolval()

30 views
Skip to first unread message

Alan Coleman

unread,
Feb 19, 2018, 9:43:46 AM2/19/18
to AdWords API Forum
Hello everyone,

I've put together a simple PHP test script based on the GetCampaigns.php example.

It returns data in my local development environment and also on my live server when being run via shell.

  • Local PHP Version: 5.6.24
  • Live PHP Version: 5.6.32

However when I run the script through a browser on my live server I get the following error:

Fatal error: Call to undefined function Google\AdsApi\AdWords\boolval() in /home2/adwordsl/public_html/app/vendor/googleads/googleads-php-lib/src/Google/AdsApi/AdWords/AdWordsSessionBuilder.php on line 134

Has anyone else come across this?

Any help would be greatly appreciated.

Thanks

Dhanya Sundararaju (AdWords API Team)

unread,
Feb 19, 2018, 1:52:46 PM2/19/18
to AdWords API Forum
Hi Alan,

The examples in the adwords php library are meant to be run from the command line and not as a webpage. If you run them as a webpage, results may not be shown properly. Please refer this guide for better clarity.

Regards,
Dhanya, AdWords API Team

Alan Coleman

unread,
Feb 21, 2018, 9:50:04 AM2/21/18
to AdWords API Forum
This issue was down to my own environments PHP Settings and a related directory issue, so unrelated to the API.

Thanks
Reply all
Reply to author
Forward
0 new messages