0

I have Magento 2.2.4.

I have tried increasing max_input_vars in php.ini file.

I have cleared var/cache, browser cache, removed domain cookies.

Still, get the error when trying to edit an existing product. But, I can create new products without any issue.

Error: Invalid Form Key. Please refresh the page.

3
  • Working or not? Jun 5 '18 at 10:09
  • Not working but thanks for the efforts Jun 5 '18 at 10:33
  • Execute sudo service apache2 restart this or not? Jun 5 '18 at 10:41
1

This problem is occurred after adding more custom options in the product because php.ini file not allowed to add more custom option.

So, required to change default settings of php.ini file.

Now, Edit your php.ini file.

If php version 7.1 then,

/etc/php/7.1/apache2/php.ini

If php version 7.0 then,

/etc/php/7.0/apache2/php.ini

Uncomment this value and update this all value in php.ini,

max_input_vars = 200000
max_input_time = 600
max_execution_time = 3600

Now Restart Apache 2 web server, and check it.

sudo service apache2 restart

1
  • happens to me periodically at magento upgrade as it wipes my local settings
    – iphigenie
    Oct 12 at 12:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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