I'm trying to Upload a zip archive to media from System/Configuration but when I choose a large file (e.g. 35MB) it redirect to Dashboard and I get the error

Invalid Form Key. Please refresh the page.

But if I upload a small file (e.g. 2MB) it is working fine.

In php.ini upload_max_filesize is 200MB

Can anyone help me please? Thank you.

2 Answers 2


Please allow PHP to bigger number of input variables ($_GET, $_POST, $_COOKIE). This should be ok : max_input_vars=10000


After I saw @rafal-kos answer I started to search what other configurations from php.ini can cause this problem and I found that the problem is not max_input_vars, the problem is post_max_size=35M, so if I change this allows me to upload files larger than 35MB.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.