Re: The real world ...

From: Date: Thu, 13 Jun 2019 12:20:29 +0000
Subject: Re: The real world ...
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-105896@lists.php.net to get a copy of this message
If you're so keen on providing the user something to see without having to use display_errors=on: Have you had a look at https://php.net/register_shutdown_function ? You can always use that to figure out whether there was a fatal error and then display something nice to the user. No leaked stacktrace, no leaked credentials, user is informed, everyone is happy :-)
Yup everyone should do that. I personally like Tracy from Nette which has a production mode that will show a nice error page: https://tracy.nette.org/en/guide Perhaps PHP should display a page like that instead of a blank page when display_errors is on "Off" no? I've seen newcomers to PHP getting quite disturbed by just getting a blank page and nothing else.

« previous php.internals (#105896) next »