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);
    }
}
《L05 电商实战》
从零开发一个电商项目,功能包括电商后台、商品 & SKU 管理、购物车、订单管理、支付宝支付、微信支付、订单退款流程、优惠券等
《L03 构架 API 服务器》
你将学到如 RESTFul 设计风格、PostMan 的使用、OAuth 流程,JWT 概念及使用 和 API 开发相关的进阶知识。
最佳答案

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

4年前 评论
讨论数量: 3

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

4年前 评论

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

4年前 评论

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

1年前 评论

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