diff options
author | Marcus Boerger <helly@php.net> | 2003-03-16 20:47:56 +0000 |
---|---|---|
committer | Marcus Boerger <helly@php.net> | 2003-03-16 20:47:56 +0000 |
commit | aba27fc6ca95c4300513ecc70ca7095e84eb4b28 (patch) | |
tree | c4a80fc498f61944db141ccd1893b69805f87e30 | |
parent | fcb43b70ef8326ad1610f313603f8d81b801fe86 (diff) | |
download | php-git-aba27fc6ca95c4300513ecc70ca7095e84eb4b28.tar.gz |
- 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?
-rw-r--r-- | main/main.c | 7 | ||||
-rw-r--r-- | php.ini-dist | 2 | ||||
-rw-r--r-- | php.ini-recommended | 2 |
3 files changed, 9 insertions, 2 deletions
diff --git a/main/main.c b/main/main.c index c2942964da..f98de09e9e 100644 --- a/main/main.c +++ b/main/main.c @@ -272,7 +272,7 @@ PHP_INI_BEGIN() 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 @@ PHPAPI void php_verror(const char *docref, const char *params, int type, const c } } } - 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); diff --git a/php.ini-dist b/php.ini-dist index a70049cbf6..7eff09ac44 100644 --- a/php.ini-dist +++ b/php.ini-dist @@ -303,6 +303,7 @@ report_memleaks = On 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 @@ track_errors = Off ; 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 diff --git a/php.ini-recommended b/php.ini-recommended index f01db638c0..1cfc032efb 100644 --- a/php.ini-recommended +++ b/php.ini-recommended @@ -318,6 +318,7 @@ report_memleaks = On 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 @@ track_errors = Off ; 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 |