0

enter image description here

local wampserver windows 10 magento2.2 to 2.3 Invalid Form Key. Please refresh the page. and Your session has expired errors click addtocart,wishlist,subscribe buttons. magento2.3.4 error i try following below:

php.ini &.htaccess &users php_value session.cookie_lifetime 86400 php_value session.gc_maxlifetime 86400 php_value max_input_vars 700000 php_value memory_limit 5G php_value max_execution_time 18000 and catch clear and flush and php bin/magento setup:upgrade php bin/magento setup:static-content:deploy php bin/magento indexer:reindex php bin/magento setup:di:compile removed var/* pub/static/*

and setting cookies life time 3600 http only yes please help 'Invalid Form Key. Please refresh the page' solution

1
  • Hello @sreenu you go to your database and find core_config_data and add web/unsecure/base_url add http://127.0.0.1/yourmagentoroot/ . And Second web/secure/base_url add https://127.0.0.1/yourmagentoroot/ after run php bin/magento c:f – Mohit Patel May 8 '20 at 11:17
0

You should change your Baseurl and Secute Baseurl to "127.0.0.1" instead of "localhost", then flush your cache.

php bin/magento setup:store-config:set --base-url="http://127.0.0.1/"
php bin/magento setup:store-config:set --base-url-secure="https://127.0.0.1/"
php bin/magento cache:flush

That should fix the issue.

2
  • i used UPDATE core_config_data SET value = '127.0.0.1/magento' WHERE core_config_data.path = 'web/unsecure/base_url'; UPDATE core_config_data SET value = '127.0.0.1/magento' WHERE core_config_data.path = 'web/secure/base_url'; and cache:flush but not solved invalid form key – sreenu May 8 '20 at 10:55
  • Usually you should have a forward slash by the end of your base urls "/". I can see it in yours. Also, get sure you clean all your browser cache, or even better, use an incognito window. – medina May 8 '20 at 10:59
0

i follow the below steps: using new window and removed cache files . invalid Form Key. Please refresh the page. error came why this error came magento2.2 and 2.3

http://127.0.0.1/magento234/index.php/ php bin/magento cache:clean php bin/magento cache:flush php bin/magento setup:upgrade php bin/magento setup:static-content:deploy php bin/magento indexer:reindex php bin/magento setup:di:compile remoed global file

please help 'invalid Form Key. Please refresh the page.' error solution

thank you

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.