open_basedir restriction in effect 问题解决
Warning: is_file(): open_basedir restriction in effect.
Warning: is_writable(): open_basedir restriction in effect.
PHP Warning: Unknown: open_basedir restriction in effect. File(/tmp) is not within the allowed path(s)
解决方案:在nginx服务器下的conf目录的里的fastcgi_params中加入如下语句:
fastcgi_param PHP_VALUE “open_basedir=/www/:/tmp”;
其中/www/ 是网站存放的目录 :/tmp是php默认写入session的目录,默认是不可写入的,由于网站所存放目录都是个性化指定的。
运行环境:CentOS +php7.2.12+nginx1.9.9