我使用nginx服务器在linux上安装了一个带有composer的新Laravel项目,但是当我在浏览器中访问该项目时,它显示了一个http 500错误。这是来自nginx的php错误日志。
[01-Feb-2018 19:38:50] WARNING: [pool www] child 4475 said into stderr: "NOTICE: PHP message: PHP Warning: require(): open_basedir restriction in effect. File(/home/wwwroot/blog/vendor/autoload.php) is not within the allowed path(s): (/home/wwwroot/blog/public/:/tmp/:/proc/) in /home/wwwroot/blog/public/index.php on line 24"
[01-Feb-2018 19:38:50] WARNING: [pool www] child 4475 said into stderr: "NOTICE: PHP message: PHP Warning: require(/home/wwwroot/blog/vendor/autoload.php): failed to open stream: Operation not permitted in /home/wwwroot/blog/public/index.php on line 24"
[01-Feb-2018 19:38:50] WARNING: [pool www] child 4475 said into stderr: "NOTICE: PHP message: PHP Fatal error: require(): Failed opening required '/home/wwwroot/blog/public/../vendor/autoload.php' (include_path='.:/usr/local/php/lib/php') in /home/wwwroot/blog/public/index.php on line 24"
我已经用Google搜索了这个错误,但没有一个解决了我的问题。任何人都可以帮助我吗?
(编辑:语法)
答案 0 :(得分:0)
您是否为bootstrap和存储文件夹提供了可写权限?它在linux环境中常见的错误。我们给index.php提供可写权限的另一个常见错误