open_basedir, File() is not within the all

2020-05-08 07:36发布

I'm having an issue with Laravel, installed on a Media Temple DV:

tempnam(): open_basedir restriction in effect. File() is not within the allowed path(s): (/var/www/vhosts/mywebsite.com/:/tmp/)

This is the code that is giving this issue:

if (empty($this->cookie_file)) {
    $this->cookie_file = tempnam("", "phrets");
}

I'm thinking that it might be a permissions thing, but I'm really not too sure.

1条回答
劫难
2楼-- · 2020-05-08 08:23

It seems you need to add directory you use form tempnam into open_basedir or ask your server adminsitrator to turn it off (reference)

查看更多
登录 后发表回答