Internal Server Error when using YouTube API & PHP

心不动则不痛 提交于 2019-12-12 00:21:59

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!