1.页面上报错为:
No input file specified.
error.log中报错为:
FastCGI sent in stderr: "PHP message: PHP Warning: Unknown: open_basedir restriction in effect. File(/www/wwwroot/**/index.php) is not within the allowed path(s): (/www/wwwroot//:/tmp/:/proc/) in Unknown on line 0
PHP message: PHP Warning: Unknown: failed to open stream: Operation not permitted in Unknown on line 0
查了很久,配置不知道在哪里?
于中无意中百度到了这篇文章,谢谢这位兄弟的博客
https://aisoa.cn/post-2785.html
执行grep -r "open_basedir" /www/
查找到的部分内容如下:
/www/wwwroot/A/.user.ini:open_basedir=/www/wwwroot/A/:/tmp/:/proc//www/wwwroot/B/.user.ini:open_basedir=/www/wwwroot/B/:/tmp/:/proc/
原来配置文件是隐藏文件.user.ini
打开A的.user.ini
改成 user.ini:open_basedir=/www/wwwroot/A/:/tmp/:/proc/:/www/wwwroot/B/data/
保存,重启nginx。