Haroldo
Haroldo

Reputation: 37377

Google API: Can't include "Google_Client.php"

Here are my files in the sublime explorer:

enter image description here

I can include config.php but not the other:

echo get_include_path();                                            //output: .:/usr/local/pear/share/pear
set_include_path(SITE_SERVER.'vendor/google-api-php-client/src');
echo get_include_path();                                            //output: /Users/harrywiles/Dropbox/Sites/headfirst/vendor/google-api-php-client/src
require_once 'config.php';                                          //works
require_once 'Google_Client.php';                                   //doesnt work

I get the classic error even though i know the paths are correct:

Fatal error: require_once(): Failed opening required 'Google_Client.php' (include_path='/Users/harrywiles/Dropbox/Sites/headfirst/vendor/google-api-php-client/src') 

This is driving me mental so any help really appreciated!

Upvotes: 0

Views: 1182

Answers (1)

Ibrahim Ulukaya
Ibrahim Ulukaya

Reputation: 12877

This is a permission error. Just go to the root of your project and run

chmod -R 755 *

If apache doesn't have permission to read and execute, that will raise these problems.

Upvotes: 2

Related Questions