Max_input_vars.htaccess causes 500 errors

I have a large form that updates in Wordpress with a plugin spitting out an error indicating that max_input_vars is set to 1000. The site is on a shared host, and technical support has updated max_input_vars to 2000 in php.ini, I checked this.

I am trying to add the following to .htaccess to find out if this problem helps, but gets a 500 error, possibly bad syntax.

php_value max_input_vars 2000 

Do I need to include this line of code in any specific format, am I missing something? Full .htaccess example below.

 # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress #php_value max_input_vars 2000 

Max_input_vars is currently commented out, so it does not cause a 500 error.

Any help would be greatly appreciated.

Greetings

+4
source share
2 answers

This one works for me. Add this section to your .htaccess file in the wordpress folder. It's all.

 <IfModule mod_php5.c> php_value max_input_vars 5000 </IfModule> 
+5
source

You will need to use the php.ini file in the root directory of your Wordpress installation. I.E. in the same place is the htaccess file.

I personally added all these 3 lines, but in most cases only the first one will be enpugh:

 max_input_vars = 3000; suhosin.post.max_vars = 3000; suhosin.request.max_vars = 3000; 
0
source

Source: https://habr.com/ru/post/1494624/


All Articles