[PATCH] Repost: html_errors more readable

php.internals

Stefan Walk

23 years ago
Hi, A while ago I proposed a patch that improved html_errors, but i got no response from that, so i repost an improved version... The patch changes they way errors are displayed: 1) They are readable. The current version prints in black with no background at all, sometimes leading to black error messages on dark backgrounds - not very readable. Additionally, they have a fixed font size so they don't appear in a 4px font somewhere. 2) They are colorized. Notices, warnings, fatal errors and other errors get distinct colors for a better quick overview. 3) They look better ;) It uses CSS to format the error message nicely. The colors used are changeable by php.ini directives. Since many people just debug in their browser without using own error_handlers or append/prepend_strings, i think this is a nice addition that makes php more user-friendly. An example of how this looks can be found at: http://prp0.prp.physik.tu-darmstadt.de/~swalk/errors.htm Regards Stefan

Jani Taskinen

23 years ago
Why don't you just use the existing ini options: ; String to output before an error message. ;error_prepend_string = "<font color=ff0000>" ; String to output after an error message. ;error_append_string = "</font>" ?? --Jani On Tue, 5 Aug 2003, Stefan Walk wrote:
>Hi, > >A while ago I proposed a patch that improved html_errors, but i got no >response from that, so i repost an improved version... > >The patch changes they way errors are displayed: >1) They are readable. > The current version prints in black with no background at all, > sometimes leading to black error messages on dark backgrounds - not > very readable. Additionally, they have a fixed font size so they > don't appear in a 4px font somewhere. >2) They are colorized. > Notices, warnings, fatal errors and other errors get distinct colors > for a better quick overview. >3) They look better ;) > It uses CSS to format the error message nicely. > >The colors used are changeable by php.ini directives. > >Since many people just debug in their browser without using own >error_handlers or append/prepend_strings, i think this is a nice >addition that makes php more user-friendly. > >An example of how this looks can be found at: >http://prp0.prp.physik.tu-darmstadt.de/~swalk/errors.htm > >Regards >Stefan >
-- https://www.paypal.com/xclick/business=sniper@php.net&no_note=1&tax=0&currency_code=EUR

Jani Taskinen

23 years ago
Nevermind, I should learn to read..you wanted to have different colors for different messages.. --Jani On Tue, 5 Aug 2003, Jani Taskinen wrote:
> > Why don't you just use the existing ini options: > > ; String to output before an error message. > ;error_prepend_string = "<font color=ff0000>" > > ; String to output after an error message. > ;error_append_string = "</font>" > > ?? > > --Jani > > >On Tue, 5 Aug 2003, Stefan Walk wrote: > >>Hi, >> >>A while ago I proposed a patch that improved html_errors, but i got no >>response from that, so i repost an improved version... >> >>The patch changes they way errors are displayed: >>1) They are readable. >> The current version prints in black with no background at all, >> sometimes leading to black error messages on dark backgrounds - not >> very readable. Additionally, they have a fixed font size so they >> don't appear in a 4px font somewhere. >>2) They are colorized. >> Notices, warnings, fatal errors and other errors get distinct colors >> for a better quick overview. >>3) They look better ;) >> It uses CSS to format the error message nicely. >> >>The colors used are changeable by php.ini directives. >> >>Since many people just debug in their browser without using own >>error_handlers or append/prepend_strings, i think this is a nice >>addition that makes php more user-friendly. >> >>An example of how this looks can be found at: >>http://prp0.prp.physik.tu-darmstadt.de/~swalk/errors.htm >> >>Regards >>Stefan >> > >
-- https://www.paypal.com/xclick/business=sniper@php.net&no_note=1&tax=0&currency_code=EUR

Stefan Walk

23 years ago
On Tue, Aug 05, 2003 at 03:32:54PM +0300, Jani Taskinen wrote:
> Why don't you just use the existing ini options: > > ; String to output before an error message. > ;error_prepend_string = "<font color=ff0000>" > > ; String to output after an error message. > ;error_append_string = "</font>" > > ?? > > --Jani
This patch is not for me, I don't debug in my browser. While helping others writing PHP, the conversation "What error message?" "There is none, look for yourself, http://..." was not rare, because the error message was hidden somewhere. Changing the default to display it in a well-formatted way would be helpful for beginners, in my - and most people i asked about this - opinion. When changing append/prepend strings, they get outputted also when html_errors is off, so putting html in them is not a good thing imo. (Also, distinct colors are not possible by doing that). Regards, Stefan Walk