max_input_vars and ACF

前提是你 提交于 2019-12-08 06:40:28

问题


for a client I have to fix a problem. At the moment he can’t save more than 66 fields in an ACF-Group. 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. I was checking and indeed the Form was sending more than 1.000 fields.

I first tried the .htaccess-Solution as described e.g. here:

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. For people with this problem, check the possibilty of the user.ini:

http://php.net/manual/de/configuration.file.per-user.php

So I translated the .htaccess to the .user.ini and uploaded this file.

max_input_vars = 5000

max_input_time = 300

max_input_nesting_level = 128

max_execution_time = 300

post_max_size = 32M

<?php phpinfo(); ?> displays set the new values are set as local values for PHP now.

But unfortunatly still, after uploading and everything, I am not able to save more than these 66 fields. Now, I have no further idea, what to do. Does anyone has an suggesstion?

Thanks a lot!


回答1:


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.post.max_vars = 20000
suhosin.request.max_vars = 20000


来源:https://stackoverflow.com/questions/19089270/max-input-vars-and-acf

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!