Re: [PHP] Configuring the error suppression

2006-05-09 Thread John Meyer

IG wrote:

John Meyer wrote:
Is there anyway to make PHP normally suppress errors, but a piece of 
code that would show errors on a particular page?




Sorry forgot to mention how you show errors on a particular page- you 
would use-

ini_set('display_errors', '1');

But are you sure you want to do this? Showing errors to your users is 
NOT a good idea as it can open your server up to all kinds of security 
issues.  Why not use the log parser idea that I said in my last mail?




I didn't get that last e-mail, and I'm on a design web server, not an 
actual production server.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Configuring the error suppression

2006-05-08 Thread John Meyer
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



Re: [PHP] Configuring the error suppression

2006-05-08 Thread Eric Butera

On 5/8/06, John Meyer [EMAIL PROTECTED] 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.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php