CGI/FastCgi 已停止工作

 public function exception()
    {
        DB::table('a')->get();
    }

一段很简单的代码。
故意测试一下异常,按道理应该是会抛出异常吧。
现在就发生了一个很奇怪的事情,直接CGI/FastCgi停止工作了。
有遇到过类似问题的朋友吗?请指点一二哦

是个新安装的项目哦
异常类代码如下

<?php

namespace App\Exceptions;

use App\Libraries\Send;
use Exception;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;

class Handler extends ExceptionHandler
{
    use Send;
    /**
     * A list of the exception types that are not reported.
     *
     * @var array
     */
    protected $dontReport = [
        //
    ];

    /**
     * A list of the inputs that are never flashed for validation exceptions.
     *
     * @var array
     */
    protected $dontFlash = [
        'password',
        'password_confirmation',
    ];

    /**
     * Report or log an exception.
     *
     * @param  \Exception $exception
     * @return void
     */
    public function report(Exception $exception)
    {
        parent::report($exception);
    }

    /**
     * Render an exception into an HTTP response.
     *
     * @param  \Illuminate\Http\Request $request
     * @param  \Exception $exception
     * @return \Illuminate\Http\Response
     */
    public function render($request, Exception $exception)
    {
        if ($exception instanceof BaseException) {
            return self::errorArray($exception->getArray());
        }
        return parent::render($request, $exception);
    }
}
《L02 从零构建论坛系统》
以构建论坛项目 LaraBBS 为线索,展开对 Laravel 框架的全面学习。应用程序架构思路贴近 Laravel 框架的设计哲学。
《L01 基础入门》
我们将带你从零开发一个项目并部署到线上,本课程教授 Web 开发中专业、实用的技能,如 Git 工作流、Laravel Mix 前端工作流等。
最佳答案

已解决了,原有环境是php7.2 切换为7.34正常了,官方手册写的最低7.2,实际上7.34才正常啊,也许是我环境哪里设置错误了吧

5年前 评论
讨论数量: 3

目前的问题是出现在debug=true情况下的。
如果关闭debug就是正常的laravel 500错误页面
如果开启debug就会出现502CGI/FastCgi停止工作

5年前 评论

已解决了,原有环境是php7.2 切换为7.34正常了,官方手册写的最低7.2,实际上7.34才正常啊,也许是我环境哪里设置错误了吧

5年前 评论

上几天看了PHP8,后来安装Laragon 5.0 + PHP8, 就出现FastCGI, 真的很块,内存从平均70%降到40%

2年前 评论

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!