[英]max_input_vars and ACF
for a client I have to fix a problem. 对于客户,我必须解决问题。 At the moment he can't save more than 66 fields in an ACF-Group.
目前,他在ACF组中不能保存超过66个字段。 I was researching a bit and found out, that one possible problem could be, that the max_input_vars in the php.ini is too low, so PHP rejects the POST-Values after 1.000 fields.
我正在研究一下,发现一个可能的问题可能是php.ini中的max_input_vars太低,因此PHP拒绝了1.000个字段之后的POST值。 I was checking and indeed the Form was sending more than 1.000 fields.
我正在检查,确实表单发送了超过1.000个字段。
I first tried the .htaccess-Solution as described eg here: 我首先尝试了.htaccess-Solution,如此处所述:
http://support.advancedcustomfields.com/forums/topic/repeater-field-values-disappearing/ http://support.advancedcustomfields.com/forums/topic/repeater-field-values-disappearing/
But, this produced an Error 500 because the machine is (as I found out) running as FastCGI. 但是,这会产生错误500,因为该机器(如我所发现的)以FastCGI的身份运行。 For people with this problem, check the possibilty of the user.ini:
对于有此问题的人,请检查user.ini的可能性:
http://php.net/manual/de/configuration.file.per-user.php http://php.net/manual/de/configuration.file.per-user.php
So I translated the .htaccess to the .user.ini and uploaded this file. 因此,我将.htaccess转换为.user.ini并上传了此文件。
max_input_vars = 5000
max_input_time = 300
max_input_nesting_level = 128
max_execution_time = 300
post_max_size = 32M
<?php phpinfo(); ?>
<?php phpinfo(); ?>
displays set the new values are set as local values for PHP now. <?php phpinfo(); ?>
显示将新值设置为PHP的本地值。
But unfortunatly still, after uploading and everything, I am not able to save more than these 66 fields. 但不幸的是,在上传完所有内容之后,我无法保存超过66个字段。 Now, I have no further idea, what to do.
现在,我不知道要做什么。 Does anyone has an suggesstion?
有人建议吗?
Thanks a lot! 非常感谢!
I had the same problem and it turned out that because the server was using the Suhosin patch I also needed to set the following my .htaccess file: 我遇到了同样的问题,结果是因为服务器使用的是Suhosin补丁,所以我还需要设置以下.htaccess文件:
suhosin.post.max_vars = 20000
suhosin.request.max_vars = 20000
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.