I just wanted to add that I've tried the EnviromentTest on my remote Apache 
shared server & this also throws the exception 

*could not located home directory*


I know running the class file, is looking for variations of the home 
directory

   - getenv('HOME')
   - getenv('HOMEDRIVE')
   - getenv('HOMEPATH')

print_r($_SERVER)

Array
(
    [CONTEXT_DOCUMENT_ROOT] => /home/testsite/public_html
    [CONTEXT_PREFIX] => 
    [DOCUMENT_ROOT] => /home/testsite/public_html
    [GATEWAY_INTERFACE] => CGI/1.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_CACHE_CONTROL] => max-age=0
    [HTTP_CONNECTION] => keep-alive
    [HTTP_COOKIE] => _jsuid=4094727426; _ga=GA1.3.1583573795.1519032551; 
wp-settings-1=editor%3Dhtml%26libraryContent%3Dbrowse%26crawl_category_tab%3Dpop%26posts_list_mode%3Dlist%26mfold%3Do;
 wp-settings-time-1=1519129313
    [HTTP_HOST] => testsite.co.uk
    [HTTP_UPGRADE_INSECURE_REQUESTS] => 1
    [HTTP_USER_AGENT] => Mozilla/5.0 (Windows NT 10.0; Win64; x64) 
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36
    [PATH] => /bin:/usr/bin
    [QUERY_STRING] => 
    [REDIRECT_STATUS] => 200
    [REMOTE_ADDR] => 86.27.46.116
    [REMOTE_PORT] => 60200
    [REQUEST_METHOD] => GET
    [REQUEST_SCHEME] => http
    [REQUEST_URI] => /home-test.php
    [SCRIPT_FILENAME] => /home/test/public_html/home-test.php
    [SCRIPT_NAME] => /home-test.php
    [SERVER_ADDR] => 72.249.48.7
    [SERVER_ADMIN] => webmaster @ testsite.co.uk
    [SERVER_NAME] => testsite.co.uk
    [SERVER_PORT] => 80
    [SERVER_PROTOCOL] => HTTP/1.1
    [SERVER_SIGNATURE] => 
    [SERVER_SOFTWARE] => Apache
    [TZ] => America/Chicago
    [UNIQUE_ID] => WpbTVqgD0l1Wrj5KH1CUrwAAAAs
    [PHP_SELF] => /home-test.php
    [REQUEST_TIME_FLOAT] => 1519833943.0969
    [REQUEST_TIME] => 1519833943 

) 

I've added a few lines to the Eviro class 

}else if (!empty($_SERVER['DOCUMENT_ROOT']) ) {
  $home = $_SERVER['DOCUMENT_ROOT'];
}

this passes the test, because we know the DOCUMENT_ROOT is found in $_SERVER

would it not be better adding this to the API ?

Cheers

Marty

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/a94bd7e7-14e6-4b2b-9bf7-eb54440485a2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • Location of ... Marty G
    • Re: Loc... 'Dhanya Sundararaju (AdWords API Team)' via AdWords API Forum
      • Re:... Marty G
        • ... Marty G
          • ... 'Dhanya Sundararaju (AdWords API Team)' via AdWords API Forum

Reply via email to