cancel
Showing results for 
Search instead for 
Did you mean: 

Can't login to admin, "Invalid Form Key. Please refresh the page."

Can't login to admin, "Invalid Form Key. Please refresh the page."

Hi everybody!

I just installed the 1.9.2.4 Magento CE, and done some basics configurations, but when I logged out and tried to login again in the admin, I get the error "Invalid Form Key. Please refresh the page."

 

Does anyone know how to resolve it?

 

Thank you so much!

Arianna

8 REPLIES

Re: Can't login to admin, "Invalid Form Key. Please refresh the page."

Inspect your web page and make sure the formkey input element is included within the form for login. My designer managed to place this input outside the form which didn't help.

 

Re: Can't login to admin, "Invalid Form Key. Please refresh the page."

You can try to clear your browsers cookie first and then try to login.


Professional magento ecommerce development - http://electroid-lab.com

Re: Can't login to admin, "Invalid Form Key. Please refresh the page."

Usually all that has ever been needed is clearing the admin cookie referencing your website. New session assigned, issue goes away.

 

And don't bookmark admin URLs with formkeys or leave them open in a tab. It can bring the issue back. Always bookmark the clean Admin panel URL and use that.

Re: Can't login to admin, "Invalid Form Key. Please refresh the page."

Such issues comes due to cookies or cache problem. Delete cache from your magento_root/var/cache and remove cookies from your browser. One more reason may be incorrect data in web/cookie/cookie_domain and web/cookie/cookie_path values in core_config_data table.

Re: Can't login to admin, "Invalid Form Key. Please refresh the page."

I am pretty sure that problems come from session storage & cookie setting

 

I blogged it detail here:

 

https://wp.me/p7UnCD-N

 

You basically should do these things:

 

DELETE FROM core_config_data WHERE path='web/cookie/cookie_domain';

DELETE FROM core_config_data WHERE path='web/cookie/cookie_path';


 

check your /app/etc/local.xml

 

 <session_save><![CDATA[files]]></session_save>

<session_save_path><![CDATA[/tmp/session]]></session_save_path>

Re: Can't login to admin, "Invalid Form Key. Please refresh the page."

After running those MySQL queries, don't forget to clear browser cache and from magento root directory, go to var folder and delete cache and session folder.

 

Note: If you'll delete the session folder all the users will be logged out and need to login again.

 

Cheers!!

Re: Can't login to admin, "Invalid Form Key. Please refresh the page."

clear cookie domain and path from core config data and change session storage in local.xml from db to files or vice versa.

That usually sorts out when it happens to me.

Tags (1)

Re: Can't login to admin, "Invalid Form Key. Please refresh the page."

There are 2 simple ways to deal with this Magento error.

The 1st one is adjusting the ‘max_input_vars’ to be greater than a 1000 and change server configuration.

The 2nd one is removing the setting without access to the admin panel.

 

To find more details about each solution, please read here:

[Solved] Magento Invalid Form Key Error

 

[ Tigren - Elite Magento E-commerce Solutions Provider - www.tigren.com ]
Tags (1)