Re: display_errors off and custom error pages
| From: | chris smith | Date: | Sat, 29 Apr 2006 00:08:33 +0000 |
| Subject: | Re: display_errors off and custom error pages | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-235052@lists.php.net to get a copy of this message | ||
On 4/29/06, IG <php@selectperformers.com> wrote:
I've spent the last couple of hours trying to work this out to no avail. I have recently moved over to a managed dedi server and no can ask my host to change my php.ini. I have found out that the 'display_errors' in the php.ini is set to off and error file logging is off. I would like to be able log to file which is easy to do from the ini file but also to show a custom error page if there is an error on one of the pages. I thought I would be able to use a custom error handler such as - ob_start(); // custom error handler function e($type, $msg, $file, $line) { blah blah ob_end_clean();Sounds like a parse error (using the code above will give you that). Try it in a htaccess file: php_flag display_errors 1 (I think). You can't use ini_set because a parse error breaks the whole script and it's not executed, so you need to change this value before the script. -- Postgresql & php tutorials http://www.designmagick.com/// display error pageexit(); } set_error_handler("e"); But all I get is a blank page. Does having display_errors off mean that I can't use a custom error handler? I have also tried adding *set_ini*('*display_errors*','1') but this keeps giving me a blank page.