How to change max_input_vars

ASH's suggested

ini_set('max_input_vars','2000' );

but this never work with ini_set. You need to set it with php.ini or .htaccess file only.


Add below code in your .htaccess file

php_value max_input_vars 2000

you can change value of 2000 to as per your need


For CentOs server - Search for php.ini file loaded using below command :

php -i | grep "Loaded Configuration File"

It displays's the loaded configuration file as per below :

Loaded Configuration File => /etc/php.ini

Edit the file using vi / vim any command, search for : max_input_vars

Default value shall : 1000, Change it to : 2000 or as per your requirement and Restart the PHP on server.

Works like charm for me always.

Tags:

Php

Xampp