$_POST 中偶尔会缺少 textarea,但 content_length 总是正确的?
运行相当活跃的站点的服务器上出现了一个奇怪的错误。
- 服务器:Apache/2.2.3 (CentOS)
- PHP:5.2.6
- eAccelerator 0.9.5.3
在使用多部分表单时,从文本区域发送的数据偶尔会在 $_POST 中丢失
我们知道数据已发送,因为 content_length 显示了合理的大小1K
表单中的所有其他输入字段均已正确接收。
它不是特定于浏览器的,发生在 IE/Firefox/Chrome 上。
几乎 99% 的时间都有效,平均每发布 100 个帖子才会失败 1 到 2 次。
在非常罕见的情况下,我们能够自己重现它,因此我们知道数据正在发送,只是没有被 apache/php 处理
所有这些设置都已经过检查并且是合理的 在 php.ini 中:
memory_limit
max_input_time
upload_max_file_size
post_max_filesize
在 httpd.conf 中
LimitRequestBody
TimeOut
我很想听听其他想法,这可能是什么。 我找不到任何已知的 PHP 相关错误。
A strange bug has popped up on a server running a fairly active site.
- Server: Apache/2.2.3 (CentOS)
- PHP: 5.2.6
- eAccelerator 0.9.5.3
While using multipart forms, occasionally data sent from a textarea will be missing in the $_POST
We know the data was sent because content_length shows a reasonable size over 1K
All other input fields in the form are properly received.
It is NOT browser specific and happens on IE/Firefox/Chrome.
Works nearly 99% of the time, only fails 1 or 2 times on average for every hundred posts made.
On very rare occasion we've been able to reproduce it ourselves so we know data is being sent, just not processed by either apache/php
All of these settings have been checked and are reasonable
in php.ini:
memory_limit
max_input_time
upload_max_file_size
post_max_filesize
in httpd.conf
LimitRequestBody
TimeOut
Would love to hear other ideas what this might be.
I cannot find any known related bug for PHP.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不确定这是问题所在(不是一个容易猜到的问题 ^^ ),但如果您有 suhoshin 安全补丁/扩展,您是否尝试停用它?
(我不知道它在 CentOS 上是否默认激活,但考虑到它是在“不太面向企业”的 Ubuntu 上,它可能是默认激活的)
我建议这样做是因为此错误报告,其中有一些注释例如:
和/或:
还有一个注释说:
您的表单/页面 HTML 有效吗? 也许,在某些罕见的情况下,事实并非如此?
也许这会有所帮助...如果没有,我很想知道这个问题的原因!
Not sure this is the problem (not an easy to guess question ^^ ), but if you have the suhoshin security patch/extension, did you try de-activating it ?
(I don't know if it's activated by default on CentOS, but it might be, considering it is on Ubuntu, which is "less entreprise oriented")
I'm suggesting this because of this bug report, in which there are a couple of notes which say, for instance :
And / or :
There is also a note which says :
Is your form / page HTML-valid ? Maybe, in some rare cases, it's not ?
Maybe this'll help... If not, I'm curious to know the reason of this problem !