Reputation: 5353
I know there is a similar question: How to display errors on laravel 4?
But I can't figure out at all how to enable error displaying. what I've done:
My code is simple:
public function getTest() {
// phpinfo();
echo $notExistingVar;
die('123');
}
I cant see '123', instead I got 500 error (looked in Chrome development tools)
Seems like I miss something simple, but I only see the WSOD. All the time. Any help is greatly appreciated
update
At least
ini_set('display_errors', '1');
helped. Not in php.ini but in php script file itself
Upvotes: 2
Views: 5926
Reputation: 193
Laravel disables display_errors in vendor\laravel\framework\src\Illuminate\Foundation\start.php with
if ($env != 'testing') ini_set('display_errors', 'Off');
This leaves you with one of the following options
As you suggested overwrite it later on with
ini_set('display_errors', 'On');
Disable ini_set with the disable_functions directive
Set the Laravel environment to 'testing'.
Upvotes: 1
Reputation: 5353
Finally!
I specified App::error callback and included 403, 404, and 500 error pages. I put simple text like "403" in 403.php, "404" in 404.php, but forgot to put anything in 500.php. Instead of white page I always saw something like "Server error" in Chrome, so totally forgot about this callback.
When you specify App::error then you won't get debug messages (doesn't matter debug is set to true or false in app config)
Upvotes: 2