beehexa integrationsidebar
beehexa logo

We Build HexaSync Integration Platform for Connecting ERP, POS, CRM, Accounting, and eCommerce Applications to Automate Business Processes

Magento 1 Invalid from key

Magento 1: Invalid Form Key. Please refresh the page, admin login

If you use vagrant to develop magento ecommerce website on a windows machine, you may have invalid form key issue.


If you have enabled system log, you will see this similar error report:

ERR (3): Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/vagrant/htdocs/var/session)  in Unknown on line 0

This error causes your customer cannot login or you cannot login to backend system, because session handler cannot write data to session storage. If you check your var/session folder, you will see list of files with empty data similar as mine

You should update your session setting in your local.xml file




After that, please remember to clear cache and your browser history, you will have your magento login system worked again. Run

ls -la



give me this output


It proved that session stored correctly.

I met this problem with this version of PHP7, Zend OPcache

if fixing the permission does not sort out the problem, it might come from cookie domain setting, this may happen when

you migrate your store from this domain to another domain. You should simply remove that row from core_config_data table

by using this query, and you can login into admin successfully

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

Table of Contents

Ready to integrate and automate at scale ?

Learn how HexaSync lets you build enterprise-grade integrations and automations without having to code.

Receive Exclusive Productivity Tips Directly in Your Inbox

We’ll email you 1-3 times per week—and never share your information.

Get started for free

You can’t add more hours to the day. Beehexa is the next best thing.