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

Installation issues


7 Posts   2035 Views


23 July 2010 at 4:55pm Community Member, 24 Posts

I installed SS on a WAMPP setup, quickly mocked up and styled a site for demo purposes and all went well.

I then tried to install on my host (in a subdomain).

I first received the the following during installation:

Warning: require_once(Zend/Log.php) [function.require-once]: failed to open stream: No such file or directory in /www/ on line 2

Fatal error: require_once() [function.require]: Failed opening required 'Zend/Log.php' (include_path='.:/usr/share/php5:/usr/share/php5/PEAR') in /www/ on line 2

I refreshed the browser and installation completed, but the follwoing message appeared at the top of the screen:

Warning: There are two files both containing the same class: '/www/' and '/www/'. This might mean that the wrong code is being used. in /www/ on line 461

Attempting to access the CMS, I first received the fatal error from Zend/Log.php, and on refreshing the page, received

[Warning] is_dir() []: open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/www/
GET /admin/

Line 152 in /www/

The solution to the first error has been discussed here, but quite honestly, it's above me. How do I find out the directory structure my host is using to set the correct paths with ini_set(). Sorry if it's a dumb question.

I also need solutions for the other errors. I can't understand the second message, as the two files it mentions appear to be identical.

Is it all perhaps to do with installing in a subdomain?

Any help would be appreciated.


24 July 2010 at 2:29am Community Member, 24 Posts

Okay, after wading through all the threads on these issues and speaking to my provider, I've got this far:

I've created a silverstripe-cache folder, which is being filled (so it works), but I'm still sporadically getting the open_basedir restriction message.

I've put an ini_set() in _config.php, and I can sporadically get the site to start, but occasionally it still throws the fatal error and shows the include path as above (i.e. as not having been changed, although it must have been to get any of the pages to come up).
This seems to have also cleared the "There are two files both containing the same class" error.
I cannot, however, get the admin pages to work at all. They always throw the fatal error.

I also tried using php_value include_path in .htaccess

php_value include_path ".:/usr/share/php5:/usr/share/php5/PEAR:/www/"

but that only throws the error
"The server encountered an internal error or misconfiguration and was unable to complete your request."

The provider said I needed "/svr/www/" as the path, but this had no effect in _config.php. The only thing that worked was /www... (with the leading slash).

I am now at a complete loss.


24 July 2010 at 6:38am Community Member, 24 Posts

Right, I echoed the content of include_path in the actual pages delivered, and it contains the correct content when the page displays. If it doesn't have the correct content, the page doesn't display and I get an error. If I can get into the site, I can click between pages, and suddenly I will get an error, and after one (or usually several) refreshes, I can get back in again. I only have the three pages from the default installation, and it is entirely random when and on which page the error triggers.

I can't get into the CMS at all because of the open_basedir error.

Please, is anybody there?


24 July 2010 at 7:11am Community Member, 215 Posts

Hi phil,

If the only problem is the open_basedir error as "File(/tmp) is not within the allowed path" and "Zend/Cache/Backend/File.php", you might want to try this:


// workaround to get ZF cache in the right folder
$_ENV['TMPDIR'] = dirname(__FILE__)."/../silverstripe-cache";


24 July 2010 at 7:47am Community Member, 24 Posts

Thanks for that.

I thought I had already done that by setting TEMP_FOLDER in an _ss_environment file. Has this changed since it was described elsewhere here?

Having done that, it now also lets me into the admin pages ... sporadically. They no longer fail with the open_basedir error, but sometimes with the include_path error. As with the site pages (which are just the same), the behaviour is entirely unpredictable.

But it is progress. Thanks a lot!


24 July 2010 at 11:18pm (Last edited: 25 July 2010 11:28am), Community Member, 24 Posts

Right, I'm another step further. PHP appears to be running in CGI mode on my host, which means that I can't use "php value" in .htaccess (thows a 500 error). That at least explains why any attempt to use htaccess failed. The include_path I'm using in _config.php (with ini_set()) must be right, otherwise I wouldn't be able to call up the site at all.

I can use all the functions and navigate to all pages, but the site still sporadically throws the error

Warning: require_once(Zend/Log.php) [function.require-once]: failed to open stream: No such file or directory in /www/ on line 2

Fatal error: require_once() [function.require]: Failed opening required 'Zend/Log.php' (include_path='.:/usr/share/php5:/usr/share/php5/PEAR') in /www/ on line 2

It is not unique to any particular page. Sometimes it will occur on a page, sometimes not.

(it also returns the warning

Warning: There are two files both containing the same class: '/www/' and '/www/'. This might mean that the wrong code is being used. in /www/ on line 461

But that's only a problem in dev mode.

Otherwise, I'm still completely at sea.

The site is at if you want to see for yourself.


25 July 2010 at 11:16am Community Member, 24 Posts

I've cobbled together a workaround, but it's not a really long-term fix:

I did a search and replace for require_once 'Zend in the whole of the sapphire directory, replacing with require_once '/full/path/to/Zend

I then had to make 4 similar manual changes to the "require_once" lines in Zend/Cache.php

The site seems now to work without throwing errors.

I cannot understand why the ini_set function in _config.php isn't working all the time. On pages which displayed, I could echo include_path, and it was set correctly with the full paths. When the error was thrown, the error showed the path set as default (without the full paths).

Any suggestions for a proper fix would be appreciated.