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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Error: open_basedir restriction in effect. after install version 2.4

Go to End

11 Posts   6365 Views


Community Member, 26 Posts

16 June 2010 at 12:33am

Thanks nakashu for your solution to this problem.

I extended your solution to make it more flexible. instead of hardcoding the server path i used Director::baseFolder(). This way you can move your SS installation from a temp folder (e.g. -> without having to change the path manually in Backend.php.

Replace the code in sapphire/thirdparty/Zend/Cache/Backend.php in line 164 - 169 with this:

        } else {
            // unix...
            if (isset($_ENV['TMPDIR']))    return $_ENV['TMPDIR'];
            if (isset($_SERVER['TMPDIR'])) return $_SERVER['TMPDIR'];
            return Director::baseFolder().'/silverstripe-cache';


Community Member, 2 Posts

16 June 2010 at 6:15am

my dear friend, it works now, I didnt understand the hole thing but just changed the code u write for us in the php file and it started to all I have understand that it shold be changed if u put it onlne, In localhost, on ur pc need no change....Thanks to all, I'll be asking soon with every other things very soon...till then the problem for us is now solved...thanks again


Community Member, 11 Posts

14 July 2010 at 9:38am

Thanks to

A webserver denied writing to the /tmp file with error code

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

After reading through everything and looking at the code of all the mentioned sites, the post of silverseba finally got me fully enlightened ;)

Thank you all for posting your replies!

Kindest Regards,

Go to Top