Take the 2-minute tour ×

I'm trying to integrate Google Drive with my web app using DrEdit with php. When I tested Google's php script locally, I was able to get to the authentication page. However, when I uploaded the script to my production server, I get the error:

opening required 'lib/apiclient/contrib/Google_OAuth2Service.php' 
in /home/my_username/public_html/google_drive/index.php on line 24

Is there any additional configuration that one must do that may be server dependent? And, I've triple checked that I've uploaded Google_OAuth2Service.php to my server.

share|improve this question

2 Answers 2

did u generate and setup a new API key (its domain name specific)?

share|improve this answer
Perhaps not...I have a client id and secret and thought that this was all that was needed. Where might I see if I've actually set up a domain specific API key? –  Eric Jun 14 '13 at 15:17
There's a google api key management console page - you get a an api key and secret per app per domain...code.google.com/apis/console, begs the question where did your original key come from? also, are you accessing your own domain or personal GDrive or trying to access the current user's? all could be relevant –  jenson-button-event Jun 14 '13 at 15:28
OK...I've now set up the api and secret for my app using the console. Further, I'm accessing it from www.mydomain.com/google_drive/index.php (where I have the files). The only difference when I do it locally is that my domain is localhost. It just seems bizarre that it would be an actual OAuth problem at this point, as the script can't even find the Google_OAuth2Service.php file. Additional thoughts would be welcome. –  Eric Jun 14 '13 at 15:40
I've been here, albeit with the c# version of the google auth lib + gdocs. I did have to fiddle with the the google domain (adding further perms to apps): developers.google.com/google-apps/help/articles/… (but yes why does it work locally, who knows its google right) –  jenson-button-event Jun 14 '13 at 15:46

OK...it turns out that the filename on gitHub was "Google_Oauth2Service.php" while it should have been "Google_OAuth2Service.php" (notice the capital "A"); since my local server is case-insensitive with regard to filenames, there wasn't a problem. I've submitted the issue to github.

share|improve this answer

Your Answer


