From 27b991941ce4db734718fa5f33e78ce27752ecb0 Mon Sep 17 00:00:00 2001 From: midoks Date: Wed, 6 Jul 2022 00:36:33 +0800 Subject: [PATCH] =?UTF-8?q?max=5Finput=5Fvars=20=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/php/conf/php7.ini | 2 +- plugins/php/conf/php8.ini | 2 +- plugins/php/index.py | 7 ++++--- plugins/php/js/php.js | 1 + 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/plugins/php/conf/php7.ini b/plugins/php/conf/php7.ini index 0f3de82dd..5b5885e21 100644 --- a/plugins/php/conf/php7.ini +++ b/plugins/php/conf/php7.ini @@ -12,7 +12,7 @@ zend.enable_gc = On expose_php = On max_execution_time = 30 max_input_time = 60 -max_input_var = 1000 +max_input_vars = 1000 memory_limit = 128M error_reporting = E_ALL display_errors = On diff --git a/plugins/php/conf/php8.ini b/plugins/php/conf/php8.ini index ef23fb53f..33a3d9f2d 100644 --- a/plugins/php/conf/php8.ini +++ b/plugins/php/conf/php8.ini @@ -12,7 +12,7 @@ zend.enable_gc = On expose_php = On max_execution_time = 30 max_input_time = 60 -max_input_var = 1000 +max_input_vars = 1000 memory_limit = 128M error_reporting = E_ALL display_errors = On diff --git a/plugins/php/index.py b/plugins/php/index.py index 47770eb23..2e22abbc1 100755 --- a/plugins/php/index.py +++ b/plugins/php/index.py @@ -346,7 +346,7 @@ def getPhpConf(version): {'name': 'asp_tags', 'type': 1, 'ps': 'ASP标签支持'}, {'name': 'max_execution_time', 'type': 2, 'ps': '最大脚本运行时间'}, {'name': 'max_input_time', 'type': 2, 'ps': '最大输入时间'}, - {'name': 'max_input_var', 'type': 2, 'ps': '最大输入数量'}, + {'name': 'max_input_vars', 'type': 2, 'ps': '最大输入数量'}, {'name': 'memory_limit', 'type': 2, 'ps': '脚本内存限制'}, {'name': 'post_max_size', 'type': 2, 'ps': 'POST数据最大尺寸'}, {'name': 'file_uploads', 'type': 1, 'ps': '是否允许上传文件'}, @@ -372,7 +372,7 @@ def getPhpConf(version): def submitPhpConf(version): gets = ['display_errors', 'cgi.fix_pathinfo', 'date.timezone', 'short_open_tag', - 'asp_tags', 'max_execution_time', 'max_input_time', 'memory_limit', + 'asp_tags', 'max_execution_time', 'max_input_time', 'max_input_vars', 'memory_limit', 'post_max_size', 'file_uploads', 'upload_max_filesize', 'max_file_uploads', 'default_socket_timeout', 'error_reporting'] args = getArgs() @@ -384,7 +384,8 @@ def submitPhpConf(version): val = g + ' = ' + args[g] + '\n' phpini = re.sub(rep, val, phpini) mw.writeFile(filename, phpini) - mw.execShell(getServerDir() + '/init.d/php' + version + ' reload') + # mw.execShell(getServerDir() + '/init.d/php' + version + ' reload') + reload(version) return mw.returnJson(True, '设置成功') diff --git a/plugins/php/js/php.js b/plugins/php/js/php.js index e3a109b42..56fdb5c5b 100755 --- a/plugins/php/js/php.js +++ b/plugins/php/js/php.js @@ -111,6 +111,7 @@ function submitConf(version) { safe_mode: $("select[name='safe_mode']").val(), max_execution_time: $("input[name='max_execution_time']").val(), max_input_time: $("input[name='max_input_time']").val(), + max_input_vars: $("input[name='max_input_vars']").val(), memory_limit: $("input[name='memory_limit']").val(), post_max_size: $("input[name='post_max_size']").val(), file_uploads: $("select[name='file_uploads']").val(),