dongzituo5530 2018-08-29 12:04
浏览 113

Laravel 5.2抛出HTTP ERROR 500

I am using laravel 5.2 setup of pre-built project. I am looking to show errors on browser window for any issue happens. I know a simple step to do that which is to modify the APP_DEBUG to true in .env file which is pointed by app.php config file with parameter debug. I did check that.

Additionally,

  1. I added ini_set property in index file to display_errors as true.

  2. Along with this, I commented all the $dontReport exceptions from app/Exceptions/Handler.php file-

    AuthorizationException::class,
    HttpException::class,
    ModelNotFoundException::class,
    ValidationException::class,
    
  3. Given 777 permission to my project directory.

At the end, all these crazy methods didn't workout. I tried all I was aware of. Looking for help from you guys.

  • 写回答

1条回答 默认 最新

  • 普通网友 2018-08-29 12:15
    关注

    Step 1/2/3 is not necessary for Laravel and you should revert those changes.

    Only APP_DEBUG=true in your .env file is required. If you are working on a local machine you should also set APP_ENV=local. To locate the 500 error without the browser you can always go look in the log file directly which is located at storage/logs.

    评论

报告相同问题?

悬赏问题

  • ¥20 软件测试决策法疑问求解答
  • ¥15 win11 23H2删除推荐的项目,支持注册表等
  • ¥15 matlab 用yalmip搭建模型,cplex求解,线性化处理的方法
  • ¥15 qt6.6.3 基于百度云的语音识别 不会改
  • ¥15 关于#目标检测#的问题:大概就是类似后台自动检测某下架商品的库存,在他监测到该商品上架并且可以购买的瞬间点击立即购买下单
  • ¥15 神经网络怎么把隐含层变量融合到损失函数中?
  • ¥15 lingo18勾选global solver求解使用的算法
  • ¥15 全部备份安卓app数据包括密码,可以复制到另一手机上运行
  • ¥20 测距传感器数据手册i2c
  • ¥15 RPA正常跑,cmd输入cookies跑不出来