问题
After months of putting it off I am trying to update my code to use Version 3 of the YouTube Data API.
I am in China so I need to use a VPN to work on this code, but the servers are in Atlanta. The line of code that gives me grief is:
$this->youtubeService = new Google_YoutubeService($this->googleClient);
That actual Google Client creates fine I can print it to the screen. I have blown away the API on the server thinking something went wrong in the upload, the example code using Books runs, I've enable the API in my console, I put printf's on either side of my code and narrowed it down to this line, but all I know is
[Error] Failed to load resource: the server responded with a status of 500 (Internal Server Error) (favouriteQuotationsMashup.php, line 0)
I can comment the line out to keep my code and my site running, but I am really not amused that I keep having to jump through hoops to get APIs to work again, YouTube is cool and all but it isn't vital to the function of my website, the only place I use it is in my quotation mashup. How do I figure out what is causing this error, especially if it is in Google's now giant beta PHP library?
来源:https://stackoverflow.com/questions/32176883/internal-server-error-when-using-youtube-api-php