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.

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   7630 Views

Avatar
silverseba

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. mydomain.com/_testarea -> mydomain.com) 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';
        }

Avatar
rakiapu

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 work...man 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

Avatar
Worp

Community Member, 11 Posts

14 July 2010 at 9:38am

Thanks to
nakashu
BigChris
silverseba

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

[Warning] is_dir() [function.is-dir]: open_basedir restriction in effect. File(/tmp/) is not within the allowed path(s): (/webspace/12/49892/cc-institut.de:/webspace/12/49892/php_includes:/webspace/12/49892/php_sessions:/webspace/12/49892/temp)
GET /admin
Line 152 in /webspace/12/49892/cc-institut.de/sapphire/thirdparty/Zend/Cache/Backend/File.php

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,
Worp

Go to Top