Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Youtubeservice and PHP / MySQL version


Go to End


5 Posts   1999 Views

Avatar
Felicitas

Community Member, 16 Posts

10 January 2011 at 12:28am

Edited: 10/01/2011 12:42am

Hi, I made several non-commercial sites with SilverStripe (for hobby). I really like this elegant CMS much more than Joomla and other CMS software.

On a few sites I have the youtubeservice module running (with SilverStripe 2.4.4). All these sites are on shared hosting. The hosting provider updated one server to PHP 5.2.16 / MySQL 5.1.54 and now the youtubeservice module stopped working (only the text "Duration :" and "( Videos)" is visible). Exactly the same module works fine on websites which are on a server with PHP 5.2.14 / MySQL 5.1.52.

When I am in dev-mode the following error is visible:
[Warning] curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when safe_mode is enabled or an open_basedir is set
Line 139 in ../sapphire/api/RestfulService.php:

curl_setopt($ch, CURLOPT_FOLLOWLOCATION,1);

However this error is not new and the same on both servers in dev-mode. In live-mode it works well on the server with PHP 5.2.14 / MySQL 5.1.52, but not on the other server.
Any clue??

Avatar
Felicitas

Community Member, 16 Posts

10 January 2011 at 3:17am

In addition to the previous post:

I commented out line 139 in RestfulService.php

On the server with PHP 5.2.14 / MySQL 5.1.52 the youtubeservice module works fine (even in dev-mode)

On the server with PHP 5.2.16 / MySQL 5.1.54 the youtubeservice module results in the following error:

[User Notice] Error occurred in processing YouTube response
Line 146 in ../youtubeservice/code/YoutubeService.php

} catch (Exception $e) {
user_error("Error occurred in processing YouTube response");
return false;
}

Avatar
Felicitas

Community Member, 16 Posts

12 January 2011 at 10:06am

Edited: 12/01/2011 10:10am

Today, out of the blue, the youtube gallery is working OK on all my sites. Obviously the fact that the module didn't work for two days had nothing to do with the PHP/MySQL update. I didn't change anything, but the error "Error occurred in processing YouTube response" is gone and youtubeservice works again.

Avatar
Tigerlilly

Community Member, 19 Posts

6 October 2011 at 11:25am

Hi there

This was happening to me on and off but now it is always off!

I get this error

[User Notice] Error occurred in processing YouTube response
GET /ai/about-us/interactive/videoTest

Line 146 in /home/aviation/public_html/ai/youtubeservice/code/YoutubeService.php
Source

137 $this->pageCount = 1;
138 } else {
139 //get total number of videos
140 $this->videoCount = $this->searchValue($response->getBody(), 'openSearch:totalResults');
141 $this->pageCount = (int)($this->videoCount/$max_results);
142 }
143
144 return $results;
145 } catch (Exception $e) {
146 user_error("Error occurred in processing YouTube response");
147 return false;
148 }
149
150 }
151
152 /**

Please help I am using version 2.4.5 running MySql 5.1.56 and PHP 5.2.17.

Thanks
Denise

Avatar
Felicitas

Community Member, 16 Posts

10 October 2011 at 4:01am

I had some problems with the Youtube module because my hosting provider (shared hosting) turned off curl_exec() for security reasons. I asked them to enable it for my websites and the Youtube module runs OK.