Re: html_errors default settings
| From: | Benno | Date: | Thu, 23 Jun 2011 21:18:36 +0000 |
| Subject: | Re: html_errors default settings | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-53569@lists.php.net to get a copy of this message | ||
Hi,
Op 23 jun. 2011 om 21:47 heeft Derick Rethans <derick@derickrethans.nl> het volgende
geschreven:
> Hi!
>
> In PHP 5.2 and earlier, the html_errors setting has always been on by
> default (in the code, in php.ini-dist and in php.ini-recommended). Since
> PHP 5.3, it's still on by default in the code and in
> php.ini-development, but php.ini-production has it off with the
> following comment:
>
> ; When PHP displays or logs an error, it has the capability of inserting html
> ; links to documentation related to that error. This directive controls whether
> ; those HTML links appear in error messages or not. For performance and security
> ; reasons, it's recommended you disable this on production servers.
>
> Right now, the docref is shown whenever html_errors=1, even if
> docref_root is not set (empty string).
>
> Sadly, this means that most distributions have it off in their php.ini.
>
> Although the setting does influence the HTML links as well, it's by no
> means a security (or performance) issue and it makes using PHP in
> development a lot more annoying (because distributions have the
> "production" version of php.ini, and not the "development" one.
> It causes many many questions being asked why Xdebug doesn't show the
> pretty errors and having it odd serves nothing. (In production, you
> should set display_errors off).
>
> A few examples:
>
>
> http://cloudfysh.wordpress.com/2010/06/11/php-xdebug-not-formatting-var_dump/
>
> http://stackoverflow.com/questions/4534312/xdebug-var-dump-function-colors
>
> http://www.paoloiannelli.com/2011/04/15/solution-for-xdebug-not-overloading-var_dump/
>
>
> http://stackoverflow.com/questions/2108576/unreadable-var-dump-output-on-snow-leopard
>
> 12:00 <Famic> I just installed xdebug on my debian box
> 12:00 <Famic> mostly for the nice output on error messages
> 12:01 <Famic> but it doesn't work (i.e. I only get the default output)
> 12:01 <Famic> any idea ?
> 12:01 <Derick> http://xdebug.org/docs/faq#format
>
> derick@xdebug:~/irclogs/OPN$ cat \#xdebug.log | grep 'faq#format' | wc -l
> 27
>
> I'd like to revert this change *and* change when the docrefs are
> shown, so that in 5.4 and trunk:
> - html_errors is on by default again.
> - the docref links are only shown when docref_root is not empty
>
> A patch is attached. Comments?
>
> cheers,
> Derick
>
>
> --
> http://derickrethans.nl |
> http://xdebug.org
> Like Xdebug? Consider a donation: http://xdebug.org/donate.php
> twitter: @derickr and @xdebug
> <docref-20110623.diff.txt>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
From the userland developer perspective this would certainly be nice.
Cheers,
Benno Crombeen