lnmp環境配置laravel專案白屏問題
阿新 • • 發佈:2019-01-31
開啟日誌顯示:
Warning: require(): open_basedir restriction in effect. File(/xxxx/bootstrap/autoload.php) is not within the allowed path(s): (/xxxx/public/:/tmp/:/proc/) in /xxxx/public/index.php on line 22
Warning: require(/xxxx/bootstrap/autoload.php): failed to open stream: Operation not permitted in /xxxx/public/index.php on line 22
Fatal error: require(): Failed opening required ‘/xxxx/public/../bootstrap/autoload.php’ (include_path=’.:/usr/local/php/lib/php’) in /xxxx/public/index.php on line 22
修改專案public/.user.ini open_basedir
chattr -i ./user.ini 修改為上一級目錄,重啟無效
查詢conf/fastcgi.conf,最後一句
fastcgi_param PHP_ADMIN_VALUE "open_basedir=$document_root/:/tmp/:/proc/";註釋掉,重啟就可以了。