Articles

How to Increase max_input_vars

If your PHP app displays the following error:

Warning: Unknown: Input variables exceeded 1000. To increase the limit change max_input_vars in php.ini. in Unknown on line 0

you have exceeded the maximum input variables for your app.

Don't worry; you can easily resolve this with a .user.ini file.

First, create a file named .user.ini in your app's web root directory.

apps/APPNAME/public/.user.ini

Then, enter the following line with the new value for your app's maximum input variables:

max_input_vars = 5000

The example above increases the maximum input to 5,000 variables.

You can confirm this customization is correct by creating another PHP script that contains only the following line:

<?php phpinfo(); ?>

Request that file through your browser, and you should see the new local value for your modified setting when you search the page for max_input_vars.