Config changes not saving, magento error, server error, hosting tech support couldn't help
Hello everyone. I have recently moved my magento installtion to a VPS. After doing this, I am having issues. I tried solving through google to no avail. I then worked with tech support (of my hosting provider) and they could not figure it out either.
1) Magento will not save config changes. When I click save, I am brought back to dashboard
2) Magento will not save new users. When I click save, I am brought back to dashboard
3) Magento will not save new products. It gives me an error message: "Invalid Form Key. Please refresh the page." Which does nothing (of course).
4) Server error says: AH01797: client denied by server configuration: /home/xxxxxxxxxx/public_html/app/etc/local.xml
We have tried many thing, but nothing is working. Any ideas?
Re: Config changes not saving, magento error, server error, hosting tech support couldn't help
Hi, specific to copying or moving Magento, and your copy is on a different domain name:
If you are receiving the error 'Invalid form key. Please refresh the page.' and all the other solutions out there are not fixing your problem, it is likely the "cookie domain" is being seen as your old domain name instead of the new.
To fix this issue, update any references to your old domain name to the new in the Varien.php file:
/<magento html dir>/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php
After updating the Varien.php file, run a reindex (can use the n98-magerun tool) and a few other commands to update things: