简体   繁体   中英

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. 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 eg 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(); ?> <?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!

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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