Uncaught exception 'InvalidArgumentException' with message 'Config file not found as specified: 'adsapi_php.ini'.

24 views
Skip to first unread message

Stephen Barrett

unread,
May 4, 2018, 12:38:40 PM5/4/18
to AdWords API and Google Ads API Forum
I just put all of these files onto a website (Wordpress site) and I can't determine where it needs me to place the adspai_php.ini file. Do I put it in the directory where I have the application, or in the theme file or in the root of the entire site? I'm a bit confused.

Stephen Barrett

unread,
May 4, 2018, 1:40:12 PM5/4/18
to AdWords API and Google Ads API Forum
I figured it out. I just had to put a path inside fromfile()

Dhanya Sundararaju (AdWords API Team)

unread,
May 4, 2018, 3:06:33 PM5/4/18
to AdWords API and Google Ads API Forum
Hi Stephen,

Great! Just to sum up, the fromFile() method looks for an adsapi_php.ini file in your home directory by default. Please refer this section of guide for better clarity. You may also use this sample code as mentioned in that section to find your home directory. However, if you want to store this file in another directory, you can pass the path of the file as an argument. For example:

fromFile('/config/myprops.ini') 

Please let me know if you have any further questions.

Regards,
Dhanya, AdWords API Team
Reply all
Reply to author
Forward
0 new messages