Magento: can't login to admin panel, can't add product to cart
If ever you encountered issues like you cannot login to the admin panel or cannot even add product to the cart, I have a better solution for you.
Using phpMyAdmin, in your magento database, look for the core_config_data table and click it. Click the "Search" tab. Then on the "path" column set the operator to LIKE %...% and the Value to cookie and click the "Go" button to search.
Adding product to cart and logging in to the admin panel should work now!
Using phpMyAdmin, in your magento database, look for the core_config_data table and click it. Click the "Search" tab. Then on the "path" column set the operator to LIKE %...% and the Value to cookie and click the "Go" button to search.
Screenshot provided for clarity |
After searching, set the value of web/cookie/cookie_path, web/cookie/cookie_domain, web/cookie/cookie_httponly, and web/browser_capabilities/cookies to NULL
Just like this on the screenshot.
Screenshot provided for clarity |
Thanks for this!
ReplyDeleteSave me hours of trouble!
i've noticed this problem on all my magento installations on a local server.
is there a way to fix this without changing the database?
Cheers mate!
So far it's the best approach rather than editing the core file
DeleteWhaaat? it's not working on my side. Are you sure Gen Nerdito?
ReplyDeleteThanks man! That was an elegant solution.
ReplyDeleteNo worries. Glad it worked on your end :)
DeleteITs not working for me..
ReplyDeleteITs not working for me..
ReplyDeleteneither for me... any other solution?
ReplyDeleteSpot on, many thanks.
ReplyDeleteFor those having trouble, clear out var/session & var/cache after these steps, worked for me after that.
Cool! Glad it worked on your end mate. Cheera
DeleteThank you so much for this info... I am not sure why I suddenly have this issue, but changing these fields fixed my Shopping Cart is Empty issue. I still cannot login to the backend however. The page just refreshes and adds "/index/index/key/77089e19c1f4cdae2daab32995fc8122/" to the url. Do you have any idea what this means? Thanks!
ReplyDeleteHi my magento 2.0.5 ce install does not have the cookie lines in the core_config_dat table but I know when I configured magento I chose the use https option now I can't access the admin panel. Do you have any other suggestions? Thanks
ReplyDelete