Hi Guys,
I've been using Adwords API for around a year or so, on a mini project using xampp & with each new release, I've managed to get it working using the old auth.ini file.
So I've downloaded the latest Google Adwords API using composer & installed it to our classes directory
- /site-root/main-application/classes/google-adwords/
I've setup all our details within the new config file "adsapi_php.ini" which all looks good!
but... for the life of me, I just cant figure out where the "adsapi_php.ini" file should be located,
so far I've tried:
- /site-root/
- /site-root/main-application/
- /site-root/main-application/classes/
- /site-root/main-application/classes/google-adwords/
- /site-root/main-application/classes/google-adwords/vendor/
- /site-root/main-application/classes/google-adwords/vendor/googleads/
Each time I try a new location I still get the same fatal error:
Uncaught exception 'InvalidArgumentException' with message 'Config file not found as specified: 'adsapi_php.ini'.
Home directory could not be located so it was not searched.' in C:\xampp\htdocs\main-application\classes\google-adwords\vendor\googleads\googleads-php-lib\src\Google\AdsApi\Common\ConfigurationLoader.php on line 77
Note: running the $_SERVER global to find the home path,
I would assume it's the [DOCUMENT_ROOT] => C:/xampp/htdocs
Array
(
[MIBDIRS] => C:/xampp/php/extras/mibs
[MYSQL_HOME] => \xampp\mysql\bin
[OPENSSL_CONF] => C:/xampp/apache/bin/openssl.cnf
[PHP_PEAR_SYSCONF_DIR] => \xampp\php
[PHPRC] => \xampp\php
[TMP] => \xampp\tmp
[HTTP_HOST] => 86.29.37.141
[HTTP_CONNECTION] => keep-alive
[HTTP_CACHE_CONTROL] => max-age=0
[HTTP_USER_AGENT] => Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36
[HTTP_UPGRADE_INSECURE_REQUESTS] => 1
[HTTP_ACCEPT] => text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
[HTTP_ACCEPT_ENCODING] => gzip, deflate
[HTTP_ACCEPT_LANGUAGE] => en-GB,en-US;q=0.9,en;q=0.8,fr;q=0.7
[HTTP_COOKIE] => PHPSESSID=5lfeujbh3ffdvn6d2c93vtjdg2
[PATH] => C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files (x86)\AMD APP\bin\x86;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Skype\Phone\;
[SystemRoot] => C:\Windows
[COMSPEC] => C:\Windows\system32\cmd.exe
[PATHEXT] => .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
[WINDIR] => C:\Windows
[SERVER_SIGNATURE] => Apache/2.4.12 (Win32) OpenSSL/1.0.1l Server at 86.29.37.141 Port 80
[SERVER_SOFTWARE] => Apache/2.4.12 (Win32) OpenSSL/1.0.1l
[SERVER_NAME] => 86.29.37.141
[SERVER_ADDR] => 192.168.0.18
[SERVER_PORT] => 80
[REMOTE_ADDR] => 86.27.46.116
[DOCUMENT_ROOT] => C:/xampp/htdocs
[REQUEST_SCHEME] => http
[CONTEXT_PREFIX] =>
[CONTEXT_DOCUMENT_ROOT] => C:/xampp/htdocs
[SERVER_ADMIN] => test @ testserver.co.uk
[SCRIPT_FILENAME] => C:/xampp/htdocs/main-application
/test/test-adwords.php
[REMOTE_PORT] => 62129
[GATEWAY_INTERFACE] => CGI/1.1
[SERVER_PROTOCOL] => HTTP/1.1
[REQUEST_METHOD] => GET
[QUERY_STRING] =>
[REQUEST_URI] => /main-application
/test/test-adwords.php
[SCRIPT_NAME] => /main-application
/test/test-adwords.php
[PHP_SELF] => /main-application
/test/test-adwords.php
[REQUEST_TIME_FLOAT] => 1519396759.455
[REQUEST_TIME] => 1519396759
)
What am I missing?
Cheers