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.

Installing SilverStripe /

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

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

Re:First few hours with SilverStripe


Go to End


3 Posts   2603 Views

Avatar
Sean

Forum Moderator, 922 Posts

2 May 2013 at 1:40pm

Hi there,

Sorry to hear you're having troubles there. Perhaps the docs aren't quite as clear as they should be, but generally if you're doing things on the command line it's much better to use composer to sort out dependency management with installing the base software and modules. This quick guide will get you started with the framework, CMS and blog, widgets and comments modules. Assuming you're on a *nix style operating system and have command line access:

First of all, install Composer:

curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer

Then install the code using composer (change /var/www/ss3 to a location of your choosing in the webroot):

cd /var/www/ss3
composer create-project silverstripe/installer .
composer require --no-update "silverstripe/blog:*"
composer require --no-update "silverstripe/widgets:*"
composer require --no-update "silverstripe/comments:*"
composer update --no-dev

Enable widgets by adding these two lines of code to mysite/_config.php:

Object::add_extension('BlogTree', 'WidgetPageExtension');
Object::add_extension('BlogEntry', 'WidgetPageExtension');

Finally, open your browser and go to where you can access the site to start installer, e.g. http://localhost/ss3/install.php

More packages can be found on packagist.org and installed like above (search "silverstripe/" on the packagist site for examples).
If I wanted to add the userforms module, for example, I would execute the following commands (change directory to where you installed SilverStripe first):

composer require --no-update "silverstripe/userforms:*"
composer update --no-dev

Now there are a lot of modules out there, and not all of them are compatible with 3.0.5, which is the latest stable version of SilverStripe at the time of this writing, however if the module is on packagist you're more likely to know the version it's *actually* compatible with.

Hope that helps.

Sean

Avatar
Apophis

Community Member, 4 Posts

3 May 2013 at 7:50am

Edited: 03/05/2013 7:54am

Thanks for the answer...

I like the way with composer, seems to work very nicely, it's similarly inspring as your Admin Interface, which is really the best in a CMS I have seen so far. Very clean and simple to use. But the setup experience in contrast is really disappointing so far.

I followed the instructions to the details, and it crashes during installation with a fatal error, and after that the Page reports:

Fatal error: Uncaught exception 'Zend_Cache_Exception' with message 'cache_dir is not writable' in /var/www/silverstripe/framework/thirdparty/Zend/Cache.php:209 Stack trace: #0 /var/www/silverstripe/framework/thirdparty/Zend/Cache/Backend/File.php(157): Zend_Cache::throwException('cache_dir is no...') #1 /var/www/silverstripe/framework/thirdparty/Zend/Cache/Backend/File.php(121): Zend_Cache_Backend_File->setCacheDir('/tmp/silverstri...') #2 /var/www/silverstripe/framework/thirdparty/Zend/Cache.php(153): Zend_Cache_Backend_File->__construct(Array) #3 /var/www/silverstripe/framework/thirdparty/Zend/Cache.php(94): Zend_Cache::_makeBackend('File', Array, false, false) #4 /var/www/silverstripe/framework/cache/Cache.php(220): Zend_Cache::factory('Core', 'File', Array, Array) #5 /var/www/silverstripe/framework/core/manifest/ClassManifest.php(123): SS_Cache::factory('SS_ClassManifes...', 'Core', Array) #6 /var/www/silverstripe/framework/core/Core.php(276): SS_ClassManifest->__construct('/var/www/silver...', false, false) #7 /var/ in /var/www/silverstripe/framework/thirdparty/Zend/Cache.php on line 209

FIXED...

I already had that on my first try:

a directory silverstripe-cache helps... thats what I found after googling for the error in the Forum. It's not in the documents for the installation and not in your explaination either. Now I am at the same point as I was yesterday before I fiddled with the gallery - upto here it is working now.

I still don't know what the way would be for a simple gallery in 3.0.6. Since Images seem to be First Class Members in SilverStripe I cant believe that there isnt a solution out of the box which just works, without throwing a Server Error 500.

Display Anything - is a mere blueprint but not a module.
DataObjectManager - seems more like a tool than really a gallery
ImageGallery - completeley out of date (2.3)
imagegallery_basic - out of date (2.4)

Its impossible to distinguish good from bad modules, there is no rating and not even a download count, its impossible to judge without actually knowing what the module is doing if it is any good.

The modules filter only can filter 3.0.0 and 3.0.1 which is aswell - out of date.

I appreciate your help - however the experience I had so far was a lot of highs and big lows...

PS:

The Blog Module document mentions some config.yml with the following:

BlogTree:
extensions:
- WidgetPageExtension
BlogEntry:
extensions:
- WidgetPageExtension

but you use:

Object::add_extension('BlogTree', 'WidgetPageExtension');
Object::add_extension('BlogEntry', 'WidgetPageExtension');

How would I know that?

These are the details which makes it VERY frustrating... it never works as expected...

Avatar
Sean

Forum Moderator, 922 Posts

3 May 2013 at 8:57am

Edited: 03/05/2013 8:59am

Hi there,

In terms of the config.yml, it's the same as the two lines that I gave you. Whether you're using the config.yml or the two lines of code I mentioned, either way works.

Cheers,
Sean