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.

2
  • Working or not? Commented Jun 5, 2018 at 10:09
  • Execute sudo service apache2 restart this or not? Commented Jun 5, 2018 at 10:41

1 Answer 1

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 Commented Oct 12, 2021 at 12:11

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.