解決LNMP開啟open_basedir出現"No input file specified"問題
PHP Warning: require(): open_basedir restriction in effect. File(/home/wwwroot/default/laravel/bootstrap/autoload.php) is not within the allowed path(s): (/home/wwwroot/default/laravel/public:/tmp/:/var/tmp/:/proc/) in /home/wwwroot/default/laravel/public/index.php on line 22
PHP Warning: require(/home/wwwroot/default/laravel/bootstrap/autoload.php): failed to open stream: Operation not permitted in /home/wwwroot/default/laravel/public/index.php on line 22
PHP Fatal error: require(): Failed opening required '/home/wwwroot/default/laravel/public/../bootstrap/autoload.php' (include_path='.:/usr/local/php/lib/php') in /home/wwwroot/default/laravel/public/index.php on line 22
lnmp
chmod -R 777 storage
查看問題描述以及資料,發現是php open_basedir 配置的問題,php不能引入其授權目錄上級及其以上的文件,默認配置在php.ini(/usr/local/php/etc/php.ini),但是我的open_basedir 並沒有配置,默認被注釋了。
文獻說可能在服務器配置目錄下,如nginx、Apache等,於是用戶sublime打開nginx進行全局搜索,open_base,果真還是搜到了,如下圖

/usr/local/nginx/conf/fastcgi.conf
