Re: Configuring the error suppression

From: Date: Mon, 08 May 2006 15:12:45 +0000
Subject: Re: Configuring the error suppression
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-235723@lists.php.net to get a copy of this message
On 5/8/06, John Meyer <john.l.meyer@gmail.com> wrote:
Is there anyway to make PHP normally suppress errors, but a piece of code that would show errors on a particular page? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Turn display errors off in your php.ini on production servers, then
you can use... ini_set('display_errors', true); ...if you must. A better way is to use the set_error_handler() function to setup your own custom error handler that will handle errors gracefully. Within that you can also go a step further and add logging features to let you know errors. I built an error handler function that emails me on any errors that my script generates so that once I leave a job I will know about problems. I'm not sure what you're trying to do, but letting end users see raw php erros is a bad idea because it gives out server path information and other sensitive details that people could potentially exploit.

« previous php.general (#235723) next »