open_basedir restriction in effect的错误及其解决办法

今天在linux上发布测试项目的时候遇到的,open_basedir主要是用来设置将用户可操作的文件限制在某目录下

open_basedir可在php.ini中设置。

言归正传遇到的问题主要是我的ci框架session储存的目录(tmp)问题,

报错如下

PHP Warning:  Unknown: open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/home/wwwroot/default) 

解决方法

chmod -R 0777 /home/wwwroot/default/tmp (你的session储存目录)

 

posted @ 2016-06-13 16:11  凌晨炫  阅读(18419)  评论(0编辑  收藏  举报