使用lnmp集成环境中,运行入口文件在根目录的public
目录下的项目时,报错:
1 | FastCGI sent in stderr: "PHP message: PHP Warning: require(): open_basedir restriction in effect. |
编辑nginx配置文件:fastcgi.conf
,把如下代码注释掉
1 | #fastcgi_param PHP_ADMIN_VALUE "open_basedir=$document_root/:/tmp/:/proc/"; |
重启
lnmp restart