简体   繁体   English

Apache webserver删除大文本POST变量

[英]Apache webserver drops large text POST variable

I am trying to POST a large input type text but on the destination script it shows the POST variable does not exist. 我试图POST一个大型输入类型的文本,但在目标脚本上它显示POST变量不存在。 I have changed my php.ini settings to the below but still to no avail. 我已将我的php.ini设置更改为以下但仍然无济于事。

;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;

; Maximum execution time of each script, in seconds
; http://php.net/max-execution-time
; Note: This directive is hardcoded to 0 for the CLI SAPI
max_execution_time = 99999

; Maximum amount of time each script may spend parsing request data. Its a good
; idea to limit this time on productions servers in order to eliminate unexpectedly
; long running scripts.
; Note: This directive is hardcoded to -1 for the CLI SAPI
; Default Value: -1 (Unlimited)
; Development Value: 60 (60 seconds)
; Production Value: 60 (60 seconds)
; http://php.net/max-input-time
max_input_time = 4800

; Maximum input variable nesting level
; http://php.net/max-input-nesting-level
;max_input_nesting_level = 256

; How many GET/POST/COOKIE input variables may be accepted
; max_input_vars = 10000

; Maximum amount of memory a script may consume (128MB)
; http://php.net/memory-limit
memory_limit = 2048M

The following error on the Apache warning log: ALERT - configured request variable value length limit exceeded - dropped variable Apache警告日志上的以下错误:ALERT - 超出配置的请求变量值长度限制 - 删除变量

If I var_dump: var_dump($file = file_get_contents('php://input')); 如果我var_dump:var_dump($ file = file_get_contents('php:// input'));

I can see the needed post variable. 我可以看到所需的post变量。

Any help would be greatly appreciated. 任何帮助将不胜感激。

You can try this in your .htaccess 您可以在.htaccess中尝试此操作

php_value post_max_size 128M

This increases the maximum post size to 128MB. 这会将最大邮件大小增加到128MB。

Also, in your php.ini, the 'max_input_vars' is commented out. 另外,在你的php.ini中,'max_input_vars'被注释掉了。 Enable it and try to increase the value. 启用它并尝试增加该值。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM