简体   繁体   中英

Laravel 5.2 throws 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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM