I've done some searching and seems everything I've read and tried with adding max_input_vars 3000
to my .htaccess and php.ini is not working. I've reached the limit on custom fields and can't get the max increased. I added these lines and restarted apache but nothing helps.
Here is what I added to .htaccess:
php_value max_input_vars 3000
php_value suhosin.get.max_vars 3000
php_value suhosin.post.max_vars 3000
php_value suhosin.request.max_vars 3000
And here is my php.ini:
max_input_vars 3000
suhosin.get.max_vars 3000
suhosin.post.max_vars 3000
suhosin.request.max_vars 3000
You can change your max_input_vars value to 2000 or any value that you want in htaccess by adding this for PHP 7.*:
<IfModule mod_php7.c>
php_value max_input_vars 2000
</IfModule>
And for PHP 8.* use this:
<IfModule mod_php8.c>
php_value max_input_vars 2000
</IfModule>
Repost from: [https://stackoverflow.com/a/29312220/3827361][1]
I had the same issue, and I fixed it by setting max_input_vars value in this php.ini: /etc/php5/apache2/php.ini
even though php_info() reported a different php.ini used (/etc/php5/cli/php.ini). BTW, before I stumbled upon the solution, I also tried setting up the value in .htaccess (in the web page root directory), with no effect.
This looks like a possible bug in PHP 5.5. In any case, I suggest locating all php.ini files on your server ("locate php.ini") and setting max_input_vars in all of them (or the first one that works, eh). Don't forget to restart Apache so this takes effect (sudo /etc/init.d/apache2 restart)
BTW, my PHP Version is 5.5.9-1ubuntu4.5, installed on Ubuntu 14.04.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With