open_basedir, File() is not within the allowed path

一笑奈何 提交于 2019-12-20 07:29:08

问题


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:


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



来源:https://stackoverflow.com/questions/26411683/open-basedir-file-is-not-within-the-allowed-path

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!