4
votes

I have a Problem with the GDATA API for Youtube.

Without making changes at my php Settings or the code I can not Access YouTube any more via PHP API.

Creating a new Zend_Gdata_YouTube Object and Loading Video data results in a 'Zend_Gdata_App_HttpException' exception with the following message:

Unable to Connect to tcp://gdata.youtube.com:80. Error #110: Connection timed out' in /usr/share/php/Zend/Gdata/App.php:688 Stack trace: #0 /usr/share/php/Zend/Gdata.php(221): Zend_Gdata_App->performHttpRequest('GET', 'http://gdata.yo...', Array, NULL, NULL, NULL) #1 /usr/share/php/Zend/Gdata/App.php(875): Zend_Gdata->performHttpRequest('GET', 'http://gdata.yo...', Array) #2 /usr/share/php/Zend/Gdata/App.php(763): Zend_Gdata_App->get('http://gdata.yo...', NULL) #3 /usr/share/php/Zend/Gdata/App.php(220): Zend_Gdata_App->importUrl('http://gdata.yo...', 'Zend_Gdata_YouT...', NULL) #4 /usr/share/php/Zend/Gdata.php(187): Zend_Gdata_App->getEntry('http://gdata.yo...', 'Zend_Gdata_YouT...') '#5' /usr/share/php/Zend/Gdata/YouTube.php(293): Zend_Gdata->getEntry('http://gdata.yo...', 'Zend_Gdata_YouT...')

I know this is a timeout. But what can cause this timeout? Since I do not mind having Change anything on the connectivity Settings of the Server and a ping to gdata.youtube.com just works perfectly.

Addionally I want to say, that the Systems runs not on a shared hosting plattform so there is no hoster doing whatever he want to do - sytem changes are performed by me personally.

2
Can you add the code around this line /usr/share/php/Zend/Gdata/App.php:688? - dnozay

2 Answers

0
votes

There is nothing on the YouTube API server side of things that would cause a connection to be completely refused from any client. Even if, for some reason, you client's traffic violated some quota limit or was blocked due to anti-DoS protection (and I'm not implying that's the case), we still would return a valid HTTP response to your request.

So, I can say with some confidence that whatever the issue is, it's not due to the YouTube API server. The most likely culprit is a networking issue somewhere between your server and the YouTube API. Standard network troubleshooting procedures are in order.

0
votes

I fixed this by changing all the google links in my upload script to be secure connections.

For example, I changed

http://uploads.gdata.youtube.com/feeds/api/users/default/uploads

to

https://uploads.gdata.youtube.com/feeds/api/users/default/uploads