Cannot “Update Attributes” of more than 999 products
-
12-12-2019 - |
Question
I've migrated to a new server, all magento files have remained the same. The only difference is that I am using CentOS 7 and MariaDB as apposed to CentOS 6.5 and MySQL.
When selecting "All" products (60k) --> Update Attributes when saving the message Total of 999 record(s) were updated*
This is despite having selected "All" with the correct number of products selected.
EDIT: This is obviously not an isolated problem: https://stackoverflow.com/questions/15497123/magento-why-cant-i-update-all-products-from-admin-grid
What steps can be taken to trouble shoot and resolve this issue?
Solution
PHP introduced in version 5.3.9 a new configuration variable called max_input_vars
with default setting is 1000. So only the first 1000 variables are read from POST
and GET
.
PHP introduced this, because there is an attack vector, to be precious a Denial of Service vector to shut down PHP. This happens, because PHP calculates hashes to store "array" values in a hash map. If the hash already exists, it is recalculated. If this hash already exists, it is rerecalulcated and so on. Afaik this "bug" is not fixed, but limited to max_input_var. More on this on security.stackexchange.com
So to fix this problem, you can either change the php.ini
, your VHost configuration
or put the raised setting in .htaccess