Re: Re: Displaying errors
| From: | Al | Date: | Sun, 16 May 2010 20:19:10 +0000 |
| Subject: | Re: Re: Displaying errors | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-305274@lists.php.net to get a copy of this message | ||
On 5/16/2010 1:10 PM, Ashley Sheridan wrote:
On Sun, 2010-05-16 at 12:57 -0400, Al wrote:On 5/16/2010 7:39 AM, Malka Cymbalista wrote:This won't work if the error is so severe as to prevent PHP from correctly running. It's always best to set things in the php.ini file, which should always be accessible on a local development machine. Thanks, Ash http://www.ashleysheridan.co.uk True. But then you usually get a server 500 error anyhow.Hi all, we are running Apache 2.2.6 and PHP 5.2.6 on a Linux machine. If someone gets an error when displaying a php web page, he does not get any error message on the screen. The arror is written into the apache error log file, but most users don't have access to the apache error logand i would like the user to see the error on the screen. Is there anything I can do? thanks for any help. Malka Cymbalista Webmaster, Weizmann Institute of Science malki.cymbalista@weizmann.ac.il 08-934-3036if(true) // TRUE for debug only {ini_set("display_errors", "on"); //use off if users will see them error_reporting(E_ALL);$error_reporting = '<span style="color:red">Error display and loggingon</span>'; } I echo $error_reporting in the body of of my html page to remind me it is on. This also creates an error log in the working dir.