Prev: Advice needed - general (GPS, databases, webs etc.)
Next: A weird problem that probably has a comma in the wrong spot....
From: Ashley Sheridan on 16 May 2010 13:10 On Sun, 2010-05-16 at 12:57 -0400, Al wrote: > > On 5/16/2010 7:39 AM, Malka Cymbalista wrote: > > 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(a)weizmann.ac.il > > 08-934-3036 > > > > > > > if(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 logging > on</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. > 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
From: Al on 16 May 2010 16:19 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: >>> 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(a)weizmann.ac.il >>> 08-934-3036 >>> >>> >> >> >> if(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 logging >> on</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. >> > > > 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.
From: Rene Veerman on 17 May 2010 01:18 On Sun, May 16, 2010 at 1:39 PM, Malka Cymbalista <Malki.Cymbalista(a)weizmann.ac.il> wrote: > 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. I've just built an experimental component logAndHandler which will display php errors in a developer & user-attractive way, but it is in it's infancy. For instance, some startup errors don't make it into the logAndHandler window yet, which can be considered a bit of a problem for an error handler ;) I will continue work on it though, i'm using it myself for my commercial projects. http://mediabeez.ws/lah for a demo http://mediabeez.ws/downloads (download "all my libraries" link) -- --------------------------------- Greetings from Rene7705, My free open source webcomponents: http://code.google.com/u/rene7705/ http://mediabeez.ws/downloads (and demos) http://www.facebook.com/rene7705 ---------------------------------
From: Phpster on 17 May 2010 07:06
On May 17, 2010, at 1:18 AM, Rene Veerman <rene7705(a)gmail.com> wrote: > On Sun, May 16, 2010 at 1:39 PM, Malka Cymbalista > <Malki.Cymbalista(a)weizmann.ac.il> wrote: >> 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. > > I've just built an experimental component logAndHandler which will > display php errors in a developer & user-attractive way, but it is in > it's infancy. > For instance, some startup errors don't make it into the logAndHandler > window yet, which can be considered a bit of a problem for an error > handler ;) > > I will continue work on it though, i'm using it myself for my > commercial projects. > > http://mediabeez.ws/lah for a demo > http://mediabeez.ws/downloads (download "all my libraries" link) > > > -- > --------------------------------- > Greetings from Rene7705, > > My free open source webcomponents: > http://code.google.com/u/rene7705/ > http://mediabeez.ws/downloads (and demos) > > http://www.facebook.com/rene7705 > --------------------------------- > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > Another option is to have the server email you with the error. Bastien Sent from my iPod |