Implementing Oauth2 login, Fatal error: Class 'Google_Service' not found
I am updating my website's login system from LightOpenID to Google's Oauth 2.0. When I require the Client.php and the Service/Oauth2.php I get an error Fatal error: Class 'Google_Service' not found in /home/myname/repos/website_current/lib/google-api-php-client/src/Google/Service/Oauth2.php on line 32 The code I am using (from my login.php file) looks like this require_once(dirname($_SERVER['DOCUMENT_ROOT']).'/lib/autoload.php'); require('Google/Client.php'); require('Google/Service/Oauth2.php'); echo "exit"; exit(); I have added the include path in the PHP.ini (in /etc/php5/apache2/php.ini)