Jump to:

23369 Posts in 18155 Topics by 2863 members

General Questions

SilverStripe Forums » General Questions » Error: open_basedir restriction in effect. after install version 2.4

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

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

Page: 1 2
Go to End
Author Topic: 4356 Views
  • silverseba
    Avatar
    Community Member
    26 Posts

    Re: Error: open_basedir restriction in effect. after install version 2.4 Link to this post

    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';
    }

  • rakiapu
    Avatar
    Community Member
    2 Posts

    Re: Error: open_basedir restriction in effect. after install version 2.4 Link to this post

    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

  • Worp
    Avatar
    Community Member
    11 Posts

    Re: Error: open_basedir restriction in effect. after install version 2.4 Link to this post

    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

    4356 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.