How to Set the max_input_vars Variable for Your entire Web Hosting Account

Updated on Jun 11, 2019

The Issue

There is an issue that could be faced when trying to edit the language file for one of our clients hosted on our Single Website Hosting Package. When the edits on the language file are finished and you attempt to save the received file quite strange error may occur:

Warning, your PHP configuration limits the maximum number of fields to post in a form:

<strong class="bbc">1000</strong> for max_input_vars

Please ask your hosting provider to increase the this limit to 5000 at least or edit the translation file manually.

It seems that the default setting of the PHP version our customer has chosen was set to a lower value (we believe it was 1000) and this was causing an issue with the script used for verifying the language file edits.

Definition

By definition in the official php configuration page, this variable seems to be used for defining the number of variables that can be sent via a POST request to the server for further processing.

Resolution

The resolution of this issue seems to be quite a simple one. In order to resolve this issue, you need to add the following code to the .htaccess file used by the client's Prestashop application.

php_value max_input_vars 5000

That would resolve the issue and you'd be able to perform the changes in the language files used by the website.

Conclusion

The max_input_vars variable should be a lower value as if it is greater one it opens the door to abusive behavior mostly with DDoS attacks hash collisions. This is the reason why we keep that variable lower on all our shared hosting packages.

If you are getting the same error message and the suggested fix does not resolve the issue for you please contact our technical support team as they will investigate and surely resolve this issue for you.

We hope you find this article useful. Discover more about FastCloud - the top-rated Hosting Solutions for personal and small business websites in four consecutive years by the HostAdvice Community!

SSD Cloud Hosting

  • Free Domain for life
  • 24/7 Technical Support
  • Fast SSD Storage
  • Hack-free Protection
  • Free Script Installation
  • Free Website Transfer
  • Free CloudFlare CDN
  • Immediate Activation
View More