dongqi7631 2018-02-01 11:56
浏览 907

新安装的laravel,在浏览器中访问时显示http 500错误

I installed a new Laravel project with composer on linux with nginx server, but when I visit the project in browser,it shows an http 500 error.this was the php error log from the nginx.

[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"

I have googled this error,but none resolved my problem.Any one could help me?

(edit : syntaxe)

  • 写回答

1条回答 默认 最新

  • dsfgds4215 2018-02-01 12:04
    关注

    Did you give writeable permission to bootstrap and storage folder ? Its common mistake in linux enviorment. Another common mistake we give writable permission to index.php

    1. Give RWX permission by filemanager or terminal like: `sudo chmod -R bootstrap storage'
    2. Remove group writable permission to index.php
    评论

报告相同问题?

悬赏问题

  • ¥15 制裁名单20240508芯片厂商
  • ¥20 易康econgnition精度验证
  • ¥15 线程问题判断多次进入
  • ¥15 msix packaging tool打包问题
  • ¥28 微信小程序开发页面布局没问题,真机调试的时候页面布局就乱了
  • ¥15 python的qt5界面
  • ¥15 无线电能传输系统MATLAB仿真问题
  • ¥50 如何用脚本实现输入法的热键设置
  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
  • ¥30 深度学习,前后端连接