From: Zeev Suraski Date: Tue, 6 Jun 2000 19:16:57 +0000 (+0000) Subject: @- Made the short_tags, asp_tags and allow_call_time_pass_reference INI directives... X-Git-Tag: PRE_EIGHT_BYTE_ALLOC_PATCH~62 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=34c40031ca8a9b8739fd9543e7e10b90fc61630a;p=php @- Made the short_tags, asp_tags and allow_call_time_pass_reference INI directives work @ on a per-directory basis as well, e.g. from .htaccess files (Zeev) --- diff --git a/NEWS b/NEWS index a815b81fd7..6ff811c60c 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,8 @@ PHP 4.0 NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? 2000, Version 4.0.1 +- Fixed a problem with static variables, default function arguments and class + member variables, that contained array values. (Andi & Zeev, Zend Engine) - Fix virtual() when used with output buffering (Marc Pohl) - Clean up constants in flock() function and add optional 3rd arg which is set to true on EWOULDBLOCK (Rasmus) diff --git a/main/main.c b/main/main.c index b596916bbc..67e8150acf 100644 --- a/main/main.c +++ b/main/main.c @@ -135,15 +135,13 @@ static PHP_INI_MH(OnChangeMemoryLimit) static PHP_INI_MH(OnUpdateErrorReporting) { - PLS_FETCH(); ELS_FETCH(); if (!new_value) { - PG(error_reporting) = E_ALL & ~E_NOTICE; + EG(error_reporting) = E_ALL & ~E_NOTICE; } else { - PG(error_reporting) = atoi(new_value); + EG(error_reporting) = atoi(new_value); } - EG(error_reporting) = PG(error_reporting); return SUCCESS; } @@ -194,8 +192,8 @@ PHP_INI_BEGIN() PHP_INI_ENTRY_EX("highlight.keyword", HL_KEYWORD_COLOR, PHP_INI_ALL, NULL, php_ini_color_displayer_cb) PHP_INI_ENTRY_EX("highlight.string", HL_STRING_COLOR, PHP_INI_ALL, NULL, php_ini_color_displayer_cb) - STD_PHP_INI_BOOLEAN("allow_call_time_pass_reference","1",PHP_INI_ALL, OnUpdateBool, allow_call_time_pass_reference, php_core_globals, core_globals) - STD_PHP_INI_BOOLEAN("asp_tags", "0", PHP_INI_ALL, OnUpdateBool, asp_tags, php_core_globals, core_globals) + STD_PHP_INI_BOOLEAN("allow_call_time_pass_reference","1",PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateBool, allow_call_time_pass_reference, zend_compiler_globals, compiler_globals) + STD_PHP_INI_BOOLEAN("asp_tags", "0", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateBool, asp_tags, zend_compiler_globals, compiler_globals) STD_PHP_INI_BOOLEAN("display_errors", "1", PHP_INI_ALL, OnUpdateBool, display_errors, php_core_globals, core_globals) STD_PHP_INI_BOOLEAN("enable_dl", "1", PHP_INI_SYSTEM, OnUpdateBool, enable_dl, php_core_globals, core_globals) STD_PHP_INI_BOOLEAN("error_append_string", NULL, PHP_INI_ALL, OnUpdateString, error_append_string, php_core_globals, core_globals) @@ -211,7 +209,7 @@ PHP_INI_BEGIN() STD_PHP_INI_BOOLEAN("register_argc_argv", "1", PHP_INI_ALL, OnUpdateBool, register_argc_argv, php_core_globals, core_globals) STD_PHP_INI_BOOLEAN("register_globals", "1", PHP_INI_ALL, OnUpdateBool, register_globals, php_core_globals, core_globals) STD_PHP_INI_BOOLEAN("safe_mode", "0", PHP_INI_SYSTEM, OnUpdateBool, safe_mode, php_core_globals, core_globals) - STD_PHP_INI_BOOLEAN("short_open_tag", "1", PHP_INI_ALL, OnUpdateBool, short_tags, php_core_globals, core_globals) + STD_PHP_INI_BOOLEAN("short_open_tag", "1", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateBool, short_tags, zend_compiler_globals, compiler_globals) STD_PHP_INI_BOOLEAN("sql.safe_mode", "0", PHP_INI_SYSTEM, OnUpdateBool, sql_safe_mode, php_core_globals, core_globals) STD_PHP_INI_BOOLEAN("track_errors", "0", PHP_INI_ALL, OnUpdateBool, track_errors, php_core_globals, core_globals) #if PHP_TRACK_VARS /* "cc -32" on IRIX 6.4 does not like (PHP_TRACK_VARS?"1":"0") - thies 991004 */ @@ -696,7 +694,6 @@ void php_request_shutdown(void *dummy) php_call_shutdown_functions(); php_ini_rshutdown(); - EG(error_reporting) = PG(error_reporting); if (PG(modules_activated)) { zend_deactivate_modules(); @@ -886,9 +883,6 @@ int php_module_startup(sapi_module_struct *sf) REGISTER_INI_ENTRIES(); - zuv.short_tags = (zend_bool) PG(short_tags); - zuv.asp_tags = (zend_bool) PG(asp_tags); - zuv.allow_call_time_pass_reference = PG(allow_call_time_pass_reference); zuv.import_use_extension = ".php"; zend_set_utility_values(&zuv); php_startup_sapi_content_types(); diff --git a/main/php_globals.h b/main/php_globals.h index fb1550cb31..7c5a0fb919 100644 --- a/main/php_globals.h +++ b/main/php_globals.h @@ -58,8 +58,6 @@ struct _php_core_globals { zend_bool magic_quotes_runtime; zend_bool magic_quotes_sybase; - zend_bool asp_tags; - zend_bool short_tags; zend_bool allow_call_time_pass_reference; zend_bool zend_set_utility_values; zend_bool output_buffering; @@ -72,7 +70,6 @@ struct _php_core_globals { long memory_limit; - int error_reporting; zend_bool track_errors; zend_bool display_errors; zend_bool log_errors;