From: Ilia Alshanetsky Date: Tue, 12 Nov 2002 14:40:00 +0000 (+0000) Subject: Changed max_input_time PHP_INI_SYSTEM|PHP_INI_PERDIR because ini_set() will X-Git-Tag: php-4.3.0RC1~79 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8ed36bc318dc35c9190db9afd7b62af1e5c882e7;p=php Changed max_input_time PHP_INI_SYSTEM|PHP_INI_PERDIR because ini_set() will already be too late, the POST/GET/COOKIE processing occures before the script gets parsed. Changed the default value to -1. If users have previously (older PHPs) adressed the problem by setting timeout to a large value, we can avoid breaking their script by detecting the -1 and using timeout_seconds instead of max_input_time when setting the 'input' timeout. --- diff --git a/main/main.c b/main/main.c index 060604d0da..145a9b707c 100644 --- a/main/main.c +++ b/main/main.c @@ -249,7 +249,7 @@ PHP_INI_BEGIN() STD_PHP_INI_BOOLEAN("html_errors", "1", 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, OnUpdateInt, xmlrpc_error_number, php_core_globals, core_globals) - STD_PHP_INI_ENTRY("max_input_time", "0", PHP_INI_ALL, OnUpdateInt, max_input_time, php_core_globals, core_globals) + STD_PHP_INI_ENTRY("max_input_time", "-1", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateInt, max_input_time, php_core_globals, core_globals) STD_PHP_INI_BOOLEAN("ignore_user_abort", "0", PHP_INI_ALL, OnUpdateBool, ignore_user_abort, php_core_globals, core_globals) STD_PHP_INI_BOOLEAN("implicit_flush", "0", PHP_INI_ALL, OnUpdateBool, implicit_flush, php_core_globals, core_globals) STD_PHP_INI_BOOLEAN("log_errors", "0", PHP_INI_ALL, OnUpdateBool, log_errors, php_core_globals, core_globals) @@ -846,7 +846,11 @@ int php_request_startup(TSRMLS_D) zend_activate(TSRMLS_C); sapi_activate(TSRMLS_C); - zend_set_timeout(PG(max_input_time)); + if (PG(max_input_time) == -1) { + zend_set_timeout(EG(timeout_seconds)); + } else { + zend_set_timeout(PG(max_input_time)); + } if (PG(expose_php)) { sapi_add_header(SAPI_PHP_VERSION_HEADER, sizeof(SAPI_PHP_VERSION_HEADER)-1, 1);