发布包含数千个值的表单 [英] Posting a form with few thousand values

查看:53
本文介绍了发布包含数千个值的表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这个基于语言的应用程序,其中包含针对每种语言的程序每个部分的语言文件,例如:

I have this language based application that has language files for each part of the program for each language, eg:

// en.inc.php
$lang['main'] = 'this is my main string';

有些文件包含超过 2000 个变量,我正在我创建的网络表单中更新翻译.

there are some files that have more that 2000 variables and I'm updating the translation in a web form I've created.

我所有几乎没有变量的语言文件都在完美更新,较大的文件只是停在随机变量处,我的更新脚本不执行.

All of my language files that have few variables are updating flawless, the larger files simply stop at a random variables and my update script doesn't execute.

post_max_size = 8M - 显然我的 2000 个 50-100 个字符的字符串不等于 8M 的数据(文件有 ~100KB)

post_max_size = 8M - clearly my 2000 strings with 50-100 characters do not sum up to 8M of data (the file has ~100KB)

上周一切正常,直到我将 PHP 更新到 5.3.16.

Last week all worked well, until I've updated PHP to 5.3.16.

帖子字段有什么变化吗?我很确定我遗漏了一些东西.由于某些不明原因,即使打开 display_errors,我也没有收到任何错误.

Did something change about post fields? I'm pretty sure there is something I am missing. For some unidentified reason I'm not getting any errors even with display_errors turned on.

推荐答案

似乎很多人忘记了 ma​​x_input_vars.它是在 5.3.9 中添加的.

Seems a lot of people forget about max_input_vars. It was added in 5.3.9.

"可以接受多少个输入变量.使用这个指令减少使用哈希的拒绝服务攻击的可能性碰撞.如果输入变量比指定的多指令,发出 E_WARNING,并且进一步的输入变量是从请求中截断.此限制仅适用于每个嵌套多维输入数组的级别."

"How many input variables may be accepted. Use of this directive mitigates the possibility of denial of service attacks which use hash collisions. If there are more input variables than specified by this directive, an E_WARNING is issued, and further input variables are truncated from the request. This limit applies only to each nesting level of a multi-dimensional input array."

这篇关于发布包含数千个值的表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆