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.


Screenshot provided for clarity

After searching, set the value of web/cookie/cookie_pathweb/cookie/cookie_domainweb/cookie/cookie_httponly, and web/browser_capabilities/cookies to NULL

Just like this on the screenshot.
Screenshot provided for clarity

Adding product to cart and logging in to the admin panel should work now!






Comments

  1. Thanks for this!
    Save 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!

    ReplyDelete
    Replies
    1. So far it's the best approach rather than editing the core file

      Delete
  2. Whaaat? it's not working on my side. Are you sure Gen Nerdito?

    ReplyDelete
  3. Thanks man! That was an elegant solution.

    ReplyDelete
  4. ITs not working for me..

    ReplyDelete
  5. ITs not working for me..

    ReplyDelete
  6. neither for me... any other solution?

    ReplyDelete
  7. Spot on, many thanks.
    For those having trouble, clear out var/session & var/cache after these steps, worked for me after that.

    ReplyDelete
  8. Thank 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!

    ReplyDelete
  9. Hi 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

Post a Comment

Popular posts from this blog

How to fix Cignal Top Box error - Please perform a smart card reset by removing your smart card for 15 seconds then reinsert the card. (1/2)