rfc:error-formatting-for-developers

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
rfc:error-formatting-for-developers [2011/07/26 21:47] – created derickrfc:error-formatting-for-developers [2017/09/22 13:28] (current) – external edit 127.0.0.1
Line 4: Line 4:
   * Date: 2011-07-26   * Date: 2011-07-26
   * Author: Derick Rethans <derick@php.net>   * Author: Derick Rethans <derick@php.net>
-  * Status: Under discussion+  * Status: Implemented in PHP 5.4
   * Related RFCs: https://wiki.php.net/rfc/newinis   * Related RFCs: https://wiki.php.net/rfc/newinis
  
Line 33: Line 33:
 It is also a FAQ for Xdebug: http://xdebug.org/docs/faq#format It is also a FAQ for Xdebug: http://xdebug.org/docs/faq#format
  
-In a development environment you would want this setting on” to aid developing. In a production environment you rather have errors not showing up, but instead logged to a file. For that, you would set display_errors to off” and log_errors=/tmp/php-errors.log. Because display_errors is already off in php.ini-production, the setting html_errors to on” has no effect, so it can quite safely be left on” instead of the current practise of forcing it off in php.ini-production. Not seeing any errors showing up is easy to notice so it’s much clearer that display_errors needs to be set to on” in those cases. The default PHP HTML marked-up errors hardly differ from the non-marked-up ones so in cases where Xdebug is not present, this does hardly show up.+In a development environment you would want this setting "onto aid developing. In a production environment you rather have errors not showing up, but instead logged to a file. For that, you would set display_errors to "offand log_errors=/tmp/php-errors.log. **Because display_errors is already "offin php.ini-production, the setting of html_errors to "onhas no effect, so it can quite safely be left "on"** instead of the current practise of forcing it "offin php.ini-production. Not seeing any errors showing up is easy to notice so it’s much clearer that display_errors needs to be set to "onin those cases. The default PHP HTML marked-up errors hardly differ from the non-marked-up ones so in cases where Xdebug is not present, this does hardly show up.
  
-The second thing to change is the way how the links to the documentation are shown whenever html_errors is set to on. Right now, they are always shown even if the docref_root setting is not set (empty string). The reason behind changing this is to de-couple the html_errors setting from documentation links behind shown. Allowing for more configurability and a better experience for the PHP developer.+The second thing to change is the way how the links to the documentation are shown whenever html_errors is set to "on". Right now, they are always shown even if the docref_root setting is not set (empty string). The reason behind changing this is to de-couple the html_errors setting from documentation links behind shown. Allowing for more configurability and a better experience for the PHP developer.
  
 ===== Patch ===== ===== Patch =====
Line 43: Line 43:
 ===== Changelog ===== ===== Changelog =====
  
-2011-07-26: initial version for discussion +  * 2011-07-26: initial version for discussion 
- +  * 2011-08-03: opened voting 
 +  * 2011-08-10: closed voting, RFC accepted 16 for and 0 against, patch committed 
 +===== Vote ===== 
 +<doodle  
 +title="Do you want to revert back to html_errors=on by default " auth="derick" voteType="single" closed="true"> 
 +   * yes 
 +   * no 
 +</doodle>
rfc/error-formatting-for-developers.1311716857.txt.gz · Last modified: 2017/09/22 13:28 (external edit)