Max Input Vars (max_input_vars in php.ini)

What is it, and why do you need to change this setting?

max_input_vars is a setting managed through the PHP setting file (php.ini) which limits the number of inputs you can set when posting forms.

The Jomres Micromanage plugin allows you to have precise control over the price of each and every day in your property, for each room type. The form has two sets of settings, one for the price, and one for the minimum interval ( minimum length of a booking that might occur on that date to be able to use that tariff ).

As there are 365 days in the year, then for setting prices for the next year, there are 365 inputs. For setting the min interval, there are another 365 inputs, making the total number of inputs ( form fields ) 730 + 11 other fields.

In Property Configuration it is possible to set the max number of years to show to a higher number. It allows those managers who can to set their prices much further into the future to do so.

micromanage config years to show


If this setting is changed, for example, to 2 then the number of inputs in the form becomes 1460 + 11

This, however, conflicts with the default PHP settings and some hardened security modules that set their own limits. In the administrator area Jomres will show you a message that looks like this.

max input vars warning in admin area

What happens if I don't change this setting?

If this setting isn't changed and a user tries to set prices for more than one year in advance, when they click Save then the tariff will not be saved and they will be returned to the default Jomres page ( the Dashboard).

What can you do?

If you are able, you can directly edit the php.ini file and set the max input vars setting, however it is very unlikely that you will be able to modify this file if you are on shared hosting.

php.ini max input vars setting

Most users, however will be able to modify the .htaccess file in the website's root directory (the directory where the Joomla or Wordpress index.php file is). In there you can add the following lines

php_value max_input_vars 3000

php_value suhosin.get.max_vars 3000

php_value 3000

php_value suhosin.request.max_vars 3000

Once you have done that, then the warning should go away and your users will be able to save complex tariffs over longer periods.

If you are using a hosting package that uses cPanel, then you can also make these changes through the cPanel user interface.

cPanel PHP configuration editor

Some hosts have their own configuration functionality, for example goDaddy allow you to use the .user.ini file to set max_input_vars in godaddy

If you are in any doubt, please check your hosts's help pages on their website, failing that contact them directly to confirm the correct method of setting max input vars on their servers.









Jomres Manual