iliaa Tue Nov 12 09:40:01 2002 EDT
Modified files:
/php4/main main.c
Log:
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.
Index: php4/main/main.c
diff -u php4/main/main.c:1.511 php4/main/main.c:1.512
--- php4/main/main.c:1.511 Sun Nov 10 14:28:51 2002
+++ php4/main/main.c Tue Nov 12 09:40:00 2002
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: main.c,v 1.511 2002/11/10 19:28:51 iliaa Exp $ */
+/* $Id: main.c,v 1.512 2002/11/12 14:40:00 iliaa Exp $ */
/* {{{ includes
*/
@@ -249,7 +249,7 @@
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 @@
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);
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php