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.

All other Modules

Discuss all other Modules here.

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

Youtubeservice and PHP / MySQL version


5 Posts   1067 Views


10 January 2011 at 12:28am (Last edited: 10 January 2011 12:42am), Community Member, 16 Posts

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??


10 January 2011 at 3:17am Community Member, 16 Posts

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;


12 January 2011 at 10:06am (Last edited: 12 January 2011 10:10am), Community Member, 16 Posts

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.


6 October 2011 at 11:25am Community Member, 16 Posts

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

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          }
144          return $results;
145       } catch (Exception $e) {
146          user_error("Error occurred in processing YouTube response");
147          return false;
148       }
150    }
152    /**

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



10 October 2011 at 4:01am Community Member, 16 Posts

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.