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

Admin section error after installing SilverStripe on the server.


Go to End


4 Posts   2673 Views

Avatar
RolfChen

Community Member, 6 Posts

22 May 2010 at 12:16pm

Hi,

I'm currently trying to put my SilverSTripe website onto the server. I downloaded v2.4 from the website, and installed onto the server fine (after discussing with the server's admin to change certain permissions) But after installation when I try to access the CMS, it comes up with the following:

[Warning] is_dir() [function.is-dir]: open_basedir restriction in effect. File(/tmp/) is not within the allowed path(s): (VIRTUAL_DOCUMENT_ROOT:/home/chroot_bind/php/php5/usr/local/lib/php/:/usr/local/lib/php:/home/chroot_lib/phplib/)
GET /admin/

Source

143 * Set the cache_dir (particular case of setOption() method)
144 *
145 * @param string $value
146 * @param boolean $trailingSeparator If true, add a trailing separator is necessary
147 * @throws Zend_Cache_Exception
148 * @return void
149 */
150 public function setCacheDir($value, $trailingSeparator = true)
151 {
152 if (!is_dir($value)) {
153 Zend_Cache::throwException('cache_dir must be a directory');
154 }
155 if (!is_writable($value)) {
156 Zend_Cache::throwException('cache_dir is not writable');
157 }
158 if ($trailingSeparator) {

Trace

is_dir(/tmp/)
Line 152 of File.php
Zend_Cache_Backend_File->setCacheDir(/tmp/,)
Line 122 of File.php
Zend_Cache_Backend_File->__construct(Array)
Line 152 of Cache.php
Zend_Cache::_makeBackend(File,Array,,)
Line 93 of Cache.php
Zend_Cache::factory(Core,File,Array,Array)
Line 835 of Data.php
Zend_Locale_Data::getContent(en_US,date)
Line 962 of Format.php
Zend_Locale_Format::getDateFormat(en_US)
Line 81 of DateField.php
DateField->__construct(SiteTreeFilterDate)
Line 224 of CMSMain.php
CMSMain->SiteTreeFilterDateField()
Line 369 of ViewableData.php
ViewableData->obj(SiteTreeFilterDateField,,,1)
Line 445 of ViewableData.php
ViewableData->XML_val(SiteTreeFilterDateField,,1)
Line 102 of .cache.home.7-web.74.90.ginakim.com.au.public.www.cms.templates.Includes.CMSMain_left.ss
include(/home/7-web/74/90/ginakim.com.au/public/www/silverstripe-cache/.cache.home.7-web.74.90.ginakim.com.au.public.www.cms.templates.Includes.CMSMain_left.ss)
Line 392 of SSViewer.php
SSViewer->process(CMSMain)
Line 342 of ViewableData.php
ViewableData->renderWith(Array)
Line 483 of LeftAndMain.php
LeftAndMain->Left()
Line 369 of ViewableData.php
ViewableData->obj(Left,,,1)
Line 445 of ViewableData.php
ViewableData->XML_val(Left,,1)
Line 59 of .cache.home.7-web.74.90.ginakim.com.au.public.www.cms.templates.LeftAndMain.ss
include(/home/7-web/74/90/ginakim.com.au/public/www/silverstripe-cache/.cache.home.7-web.74.90.ginakim.com.au.public.www.cms.templates.LeftAndMain.ss)
Line 392 of SSViewer.php
SSViewer->process(CMSMain)
Line 202 of Controller.php
Controller->handleAction(SS_HTTPRequest)
Line 134 of RequestHandler.php
RequestHandler->handleRequest(SS_HTTPRequest)
Line 147 of Controller.php
Controller->handleRequest(SS_HTTPRequest)
Line 283 of Director.php
Director::handleRequest(SS_HTTPRequest,Session)
Line 127 of Director.php
Director::direct(/admin/)
Line 127 of main.php

Can anyone help please? Is it to do with permissions?

Regards

Avatar
Willr

Forum Moderator, 5523 Posts

22 May 2010 at 8:29pm

You may not have permission to write to the cache folder (/tmp/) so create a 'silverstripe-cache' folder in your silverstripe installation and run a dev/build?flush=1. Make sure this new silverstripe-cache folder has read / write permissions.

Avatar
RolfChen

Community Member, 6 Posts

23 May 2010 at 9:11pm

Thanks for the quick reply, I have already created a "sliverstripe-cache" folder at root level, and it does have read/write permission on it, as it was required when I'm performing the install of Silverstripe.

The problem described actually happens after everything's installed, and when I'm type http://www.mydomain.com/admin section.

Is there anything else I can do to fix this?

Avatar
turtleline

Community Member, 6 Posts

4 June 2010 at 2:17pm

Suggest trying this fix which resolved the problem for me. It will be included in 2.4.1 when available.
If using version 2.4.0 edit the file /sapphire/_config.php and add the two lines as highlighted in this change:
http://open.silverstripe.org/changeset/105468

Then do a www.mysite.xyz/dev/build/ and www.mysite.xyz?flush=1