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.

Installing SilverStripe

Getting SilverStripe up and running on your computer and on your web server.

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

Installing PHPUnit


7 Posts   2289 Views


26 January 2011 at 3:28am Community Member, 164 Posts

I'm trying to install PHPUnit, so I can experiment with i18n and unit testing. However, when I try to install according to the instructions at or the site seems to be down.

pear channel-discover
Discovering channel over http:// failed with message: channel-a
dd: Cannot open "" (File http://components.ez
.no:80/channel.xml not valid (redirected but no location))
Trying to discover channel over https:// instead
Discovery of channel "" failed (channel-add: Cannot open "https:
//" (Connection to `' failed: A
connection attempt failed because the connected party did not properly respond a
fter a period of time, or established connection failed because connected host h
as failed to respond.

Does anyone know of a mirror for this site? Or an alternative way of installing the component/module?


26 January 2011 at 4:21am Community Member, 141 Posts

Yapp, the whole ez-components site seems to be down. :(

Mabe it's just a temporary problem, but here is an alternative description to install phpunit:

Good luck!


27 January 2011 at 1:39am Community Member, 164 Posts

Site was back up today, and installed PHPUnit. Unfortunately the http://localhost/site/dev/tasks/i18nTextCollectorTask/?module=Sitemap generated an virtually empty en_US.php file. All it contained was:


global $lang;

?> did generate a language file, but I am curious to why the built in SS generator didn't work.


27 January 2011 at 4:28pm Forum Moderator, 5511 Posts

It isn't case sensitive is it? i.e Sitemap vs sitemap?


27 January 2011 at 8:30pm Community Member, 164 Posts

Nope, case didn't make a difference, still a virtual empty language file.


28 January 2011 at 9:37am Forum Moderator, 5511 Posts

Got an example of a _t call in your sitemap module? Check they are in the format (for php - _t('ClassName.STRINGNAME', 'Value'), for templates _t('STRINGNAME', 'Value');


29 January 2011 at 10:21am Community Member, 164 Posts

This is what I'm using in my class (full module can be downloaded from )

   public function updateCMSFields(&$fields) {
      $fields->addFieldToTab("Root.Content." . _t('SitemapModule.SITEMAP','Sitemap', PR_HIGH, 'Tab name'), new CheckboxField("IncludeSitemap", _t('SitemapModule.INCLUDESITEMAP',"Include a sitemap on this page")));
      $fields->addFieldToTab("Root.Content." . _t('SitemapModule.SITEMAP'), new OptionalTreeDropdownField('BasePage', _t('SitemapModule.BASEPAGE',"Base page"), 'SiteTree', 'URLSegment', 'MenuTitle'));
      $fields->addFieldToTab("Root.Content." . _t('SitemapModule.SITEMAP'), new NumericField("Depth", _t('SitemapModule.DEPTH',"Depth (0 = unlimited)")));
      $fields->addFieldToTab("Root.Content." . _t('SitemapModule.SITEMAP'), new CheckboxField("ShowPageName", _t('SitemapModule.SHOWPAGENAME',"Show page name")));
      $fields->addFieldToTab("Root.Content." . _t('SitemapModule.SITEMAP'), new CheckboxField("ShowPageMetaTitle", _t('SitemapModule.SHOWMETATITLE',"Show meta title")));
      $fields->addFieldToTab("Root.Content." . _t('SitemapModule.SITEMAP'), new CheckboxField("ShowPageMetaDescription", _t('SitemapModule.SHOWMETADESCRIPTION',"Show meta description")));
      $fields->addFieldToTab("Root.Content." . _t('SitemapModule.SITEMAP'), new CheckboxField("ShowPageThumbnail", _t('SitemapModule.SHOWPAGETHUMB',"Show page thumbnail")));
      $fields->addFieldToTab("Root.Content." . _t('SitemapModule.SITEMAP'), new CheckboxField("ShowSelf", _t('SitemapModule.EXCLUDEPAGE',"Exclude this page from sitemap")));
      $fields->addFieldToTab("Root.Content." . _t('SitemapModule.SITEMAP'), new TextField("Stylesheet", _t('SitemapModule.STYLESHEET',"Stylesheet")));