PHP error message page

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I want to ask something about error message from PHP.

Sometimes the php web page return error messages when the web page has
bugs and they sometimes show file names and locations. This make the
web site dangerous as I put the price information of my product in a
xml file.

Could anyone tell me how to redirect the web page to a self-made error
page when error happens?


Re: PHP error message page

terry wrote:
Quoted text here. Click to load it

In my php.ini I have:

    error_reporting = E_ALL
    display_errors = Off
    log_errors = On
    track_errors = Off
    error_log = /var/www/log/phperrors.log

which means that I want *ALL* errors reported to a file and *not* to the

When I am doing a quick test for something, I just include

    ini_set('display_errors', '1');

in my code, to have the errors reported to the browser (well, really I
test much more with the CLI php).

Mail sent to my "From:" address is publicly readable at /
== ** ## !!                                                         !! ## ** ==
bypass the spam filter. I will answer all pertinent mails from a valid address.

Re: PHP error message page

Pedro Graca wrote:

Quoted text here. Click to load it

You can also create a custom error handler which might, for example, fire
you off an email in the event of an error, depending on the type of error

Chris Hope - The Electric Toolbox - /

Site Timeline