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储存目录)