dsbiw2911188 2018-02-27 03:04
浏览 328
已采纳

新安装的laravel 5.6在索引页面中获取HTTP ERROR 500

Hi everyone I'm having a hard time debugging an issue in laravel 5.6 freshly installed after upgrading from php 7.0 to php 7.1. I've already generated an app key for my test project. Changed owner to www-data and permission to 777 since it's just a test project.

Restarting php 7.1 fpm and NGINX is also done.

Please note that I can be able to run the project after running php aritsan serve command, I'm also able to ping the project but not able to access it using laraveltestauth.ng in URL.

laravel.log

[2018-02-27 02:45:28] local.ERROR: Parse error: syntax error, unexpected '?', expecting variable (T_VARIABLE) {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): Parse error: syntax error, unexpected '?', expecting variable (T_VARIABLE) at /development/sites/www/laravelAuth/vendor/symfony/finder/Comparator/NumberComparator.php:42)
[stacktrace]
#0 /development/sites/www/laravelAuth/vendor/composer/ClassLoader.php(301): Composer\\Autoload\\includeFile('/development/si...')
#1 [internal function]: Composer\\Autoload\\ClassLoader->loadClass('Symfony\\\\Compone...')
#2 /development/sites/www/laravelAuth/vendor/symfony/finder/Finder.php(120): spl_autoload_call('Symfony\\\\Compone...')
#3 /development/sites/www/laravelAuth/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php(420): Symfony\\Component\\Finder\\Finder->depth(0)
#4 /development/sites/www/laravelAuth/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(381): Illuminate\\Filesystem\\Filesystem->directories('/development/si...')
#5 /development/sites/www/laravelAuth/vendor/laravel/framework/src/Illuminate/Support/helpers.php(1038): Illuminate\\Foundation\\Exceptions\\Handler->Illuminate\\Foundation\\Exceptions\\{closure}(Object(Whoops\\Handler\\PrettyPageHandler))
#6 /development/sites/www/laravelAuth/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(384): tap(Object(Whoops\\Handler\\PrettyPageHandler), Object(Closure))
#7 /development/sites/www/laravelAuth/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(334): Illuminate\\Foundation\\Exceptions\\Handler->whoopsHandler()
#8 /development/sites/www/laravelAuth/vendor/laravel/framework/src/Illuminate/Support/helpers.php(1038): Illuminate\\Foundation\\Exceptions\\Handler->Illuminate\\Foundation\\Exceptions\\{closure}(Object(Whoops\\Run))
#9 /development/sites/www/laravelAuth/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(339): tap(Object(Whoops\\Run), Object(Closure))
#10 /development/sites/www/laravelAuth/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(314): Illuminate\\Foundation\\Exceptions\\Handler->renderExceptionWithWhoops(Object(Symfony\\Component\\Debug\\Exception\\FatalThrowableError))
#11 /development/sites/www/laravelAuth/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(287): Illuminate\\Foundation\\Exceptions\\Handler->convertExceptionToResponse(Object(Symfony\\Component\\Debug\\Exception\\FatalThrowableError))
#12 /development/sites/www/laravelAuth/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(188): Illuminate\\Foundation\\Exceptions\\Handler->prepareResponse(Object(Illuminate\\Http\\Request), Object(Symfony\\Component\\Debug\\Exception\\FatalThrowableError))
#13 /development/sites/www/laravelAuth/app/Exceptions/Handler.php(51): Illuminate\\Foundation\\Exceptions\\Handler->render(Object(Illuminate\\Http\\Request), Object(Symfony\\Component\\Debug\\Exception\\FatalThrowableError))
#14 /development/sites/www/laravelAuth/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(326): App\\Exceptions\\Handler->render(Object(Illuminate\\Http\\Request), Object(Symfony\\Component\\Debug\\Exception\\FatalThrowableError))
#15 /development/sites/www/laravelAuth/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(124): Illuminate\\Foundation\\Http\\Kernel->renderException(Object(Illuminate\\Http\\Request), Object(Symfony\\Component\\Debug\\Exception\\FatalThrowableError))
#16 /development/sites/www/laravelAuth/public/index.php(55): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request))
#17 {main}
"} 
[2018-02-27 02:45:28] local.ERROR: Exception thrown without a stack frame {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalErrorException(code: 16): Exception thrown without a stack frame at Unknown:0)
[stacktrace]
#0 {main}
"} 

NGINX Server Config

server {
    listen 80;

    root /development/sites/www/laravelAuth/public;
    index index.php index.html index.htm index.nginx-debian.html;
    server_name laraveltestauth.ng www.laraveltestauth.ng;

    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

    location ~ \.php$ {
        try_files $uri /index.php =404;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass  127.0.0.1:9000;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }

    location ~ /\.ht {
        deny all;
    }
}

Hosthack

127.0.1.1   laraveltestauth.ng          www.laraveltestauth.ng

Let me know if there's anything I can add. Thanks in advance

  • 写回答

1条回答 默认 最新

  • duanlan7239 2018-02-27 06:39
    关注

    php artisan server runs the CLI version which is correct and the latest 7.1.

    Your web server is still running the old PHP version. Make sure it is set up correctly with the latest version. Even if you delete the old version, your server can still keep it running in memory until the issue is resolved.

    Try service php7.0-fpm stop and service php7.1-fpm restart and service nginx restart.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 AT89C51控制8位八段数码管显示时钟。
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 下图接收小电路,谁知道原理
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口