helly Sun Mar 16 15:47:56 2003 EDT
Modified files:
/php4/main main.c
/php4 php.ini-dist php.ini-recommended
Log:
- disable html_errors per default as suggested by php.ini-<xxx>
- new error format that does not point to any documentation (if either
not html_errors or no docref_root given e.g.: production boxes and default)
- documentation update in php.ini-<xxx>
# hope everyone is happy now
# and why on earth was enabling html_errors default?
Index: php4/main/main.c
diff -u php4/main/main.c:1.539 php4/main/main.c:1.540
--- php4/main/main.c:1.539 Sat Mar 15 11:39:35 2003
+++ php4/main/main.c Sun Mar 16 15:47:56 2003
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: main.c,v 1.539 2003/03/15 16:39:35 helly Exp $ */
+/* $Id: main.c,v 1.540 2003/03/16 20:47:56 helly Exp $ */
/* {{{ includes
*/
@@ -272,7 +272,7 @@
STD_PHP_INI_BOOLEAN("expose_php", "1",
PHP_INI_SYSTEM, OnUpdateBool, expose_php,
php_core_globals, core_globals)
STD_PHP_INI_ENTRY("docref_root", "http://www.php.net/", PHP_INI_ALL,
OnUpdateString, docref_root, php_core_globals,
core_globals)
STD_PHP_INI_ENTRY("docref_ext", "",
PHP_INI_ALL, OnUpdateString, docref_ext,
php_core_globals, core_globals)
- STD_PHP_INI_BOOLEAN("html_errors", "1",
PHP_INI_ALL, OnUpdateBool, html_errors,
php_core_globals, core_globals)
+ STD_PHP_INI_BOOLEAN("html_errors", "0",
PHP_INI_ALL, OnUpdateBool, html_errors,
php_core_globals, core_globals)
STD_PHP_INI_BOOLEAN("xmlrpc_errors", "0",
PHP_INI_SYSTEM, OnUpdateBool, xmlrpc_errors,
php_core_globals, core_globals)
STD_PHP_INI_ENTRY("xmlrpc_error_number", "0", PHP_INI_ALL,
OnUpdateLong, xmlrpc_error_number, php_core_globals,
core_globals)
STD_PHP_INI_ENTRY("max_input_time", "-1",
PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateLong,
max_input_time, php_core_globals, core_globals)
@@ -489,7 +489,10 @@
}
}
}
- if (PG(html_errors)) {
+ if (!PG(html_errors) || !strlen(PG(docref_root))) {
+ /* no docref and no html errors -> do not point to any
documentation (e.g. production boxes) */
+ php_error(type, "%s(%s): %s",
get_active_function_name(TSRMLS_C), params, buffer);
+ } else if (PG(html_errors)) {
php_error(type, "%s(%s) [<a href='%s%s%s'>%s</a>]:
%s", get_active_function_name(TSRMLS_C), params, docref_root, docref, docref_target,
docref, buffer);
} else {
php_error(type, "%s(%s) [%s%s%s]: %s",
get_active_function_name(TSRMLS_C), params, docref_root, docref, docref_target,
buffer);
Index: php4/php.ini-dist
diff -u php4/php.ini-dist:1.184 php4/php.ini-dist:1.185
--- php4/php.ini-dist:1.184 Fri Mar 14 19:21:45 2003
+++ php4/php.ini-dist Sun Mar 16 15:47:56 2003
@@ -303,6 +303,7 @@
track_errors = Off
; Disable the inclusion of HTML tags in error messages.
+; Note: Never use this feature for production boxes.
;html_errors = Off
; If html_errors is set On PHP produces clickable error messages that direct
@@ -311,6 +312,7 @@
; and change docref_root to the base URL of your local copy including the
; leading '/'. You must also specify the file extension being used including
; the dot.
+; Note: Never use this feature for production boxes.
;docref_root = /phpmanual/
;docref_ext = .html
Index: php4/php.ini-recommended
diff -u php4/php.ini-recommended:1.130 php4/php.ini-recommended:1.131
--- php4/php.ini-recommended:1.130 Fri Mar 14 19:21:45 2003
+++ php4/php.ini-recommended Sun Mar 16 15:47:56 2003
@@ -318,6 +318,7 @@
track_errors = Off
; Disable the inclusion of HTML tags in error messages.
+; Note: Never use this feature for production boxes.
;html_errors = Off
; If html_errors is set On PHP produces clickable error messages that direct
@@ -326,6 +327,7 @@
; and change docref_root to the base URL of your local copy including the
; leading '/'. You must also specify the file extension being used including
; the dot.
+; Note: Never use this feature for production boxes.
;docref_root = /phpmanual/
;docref_ext = .html
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php