In this article i want to say something about max_input_vars issue, which is common error in prestashop translations feature. For the first i want to say that this isn't prestashop error. This is issue related to the your webservice (hosting) configuration. What does it mean? It mean that the only way to fix this issue is an access to hosting configuration files - without this it will be unavailable to fix... BUT if you have got PHP in version 5.3+ you can use some easy solution. So, I want to show you, how to configure it properly. For the first i want to say something more what exactly max_input_vars is:
max_input_vars - what is it?
This is php configuration parameter - it says how many input variables may be accepted (this kind of limit is applied to $_GET, $_POST and $_COOKIE superglobal variables separately). This variable was created for fighting with hackers. Use of this directive mitigates the possibility of DOS (denial of service) attacks which use hash collisions. Is ome website uses more input fields / variables than specified by this directive, an E_WARNING is issued, and further input variables are truncated from the request. This limit applies only to each nesting level of a multi-dimensional input array.
max_input_vars is configuration param which works in PHP_INI_PREDIR mode. What does it mean? It mean that value of this param can be set in php.ini, .htaccess, httpd.conf or user.ini files - but this is available since PHP 5.3
Easiest way to fix it
If your webhosting service uses PHP in version 5.3+ you can try to fix this by creating own value of this param. All you have to do is editing .htaccess file in your prestashop root directory. You must add there line that i pasted below:
php_flag max_input_vars 4000
It should work, but maybe your ISP don't allow to do that - we don't know - so you must check it by yourself. And what you can do, if your webhosting service doesnt allow to change this param in this way? Read other suggestions below:
How to change max_input_vars param value?
As i said above, you must have got an access to php.ini configuration file. Where you can find it out? Well, this is related for hosting configuration. In some cases you can edit this file via hosting control panel, like cpanel, directadmin or aruba control panel, in other cases you can find this file on your FTP. I assume now that you have access to this file. So, for the first open it and search for:
max_input_vars = 1000
Increase the 1000 value. You should set it up with sufficient value. In error that i pasted above, you can see something like:
"..increase this limit to 3543..."
so this value is minimal value of max_input_vars variable. It is better to enter a greater than minimal value, because you can always install new modules, which increases the demand. So, i set it up to 4000:
max_input_vars = 4000
Save changes and save the configuration or reupload this file into your hosting. Now it should works for you.
I changed configuration file but it doesn't work
Sometimes webhosting works with feature called suhosin. it doesn't matter what this is. But in this case you should also change values of suhosin max input vars. Just open the same php.ini file and find out variables:
suhosin.request.max_vars = 1000 suhosin.post.max_vars = 1000
and change values to 4000, exactly as below:
suhosin.request.max_vars = 4000 suhosin.post.max_vars = 4000
What can I do if I haven't got access to the configuration?
For the first, you should ask your webhosting probvider to increase max_input_vars value. It's hard to say, but many webhosting companies don't want to do that due to the security restrictions. So, what then? You can create WAMP server on localhost (if you use windows OS) and edit module translations there - then upload language files to the ftp. It should works :) We will write tutorial about dealing with WAMP and prestashop, see you soon :-)
Fix for GoDaddy hosting:
if you use outstanding GoDaddy host, you have to use a bit different method, just read this tutorial: GoDaddy host and max input vars issue