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. neither for me... any other solution?

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

    ReplyDelete
  6. 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
  7. 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
  8. Magento is one of the most popular eCommerce platform, customizable shopping cart platforms available. If you have chosen Magento as your eCommerce platform (WebSite), Acelerar can offer you end-to-end support with our efficient and streamlined Magento Bulk Product Upload Services at the most economical rates and 24x7 Support. Our Experts have a wealth of experience working on Magento Product Upload Services on eCommerce platform. http://www.magentoproductdataentry.com

    ReplyDelete
  9. India Data Entry Services is a trusted Professional Magento Product Data Entry Services provider to e-commerce companies and platforms. Be it e-commerce product cataloguing or Product Upload Services, since our inception in 2010, we are striving to get all best o cater global organizations. The company is strategically positioned to support big or small e-Commerce Stores working on various domains such as fashion apparels, crockery items, furniture, accessories, shoes.

    ReplyDelete
  10. Get the Best Magento Product upload Services From Us With the drastic facelift that the retail sector has seen in the recent past, the internet gas become the hub for most of the small, medium as well as large scale businesses that are involved in the same.The ecommerce has seen a monumental growth prospective over the last couple of years and the trend is expected to remain the same for the foreseeable future as well. In this regard, what concerns the businesses and the online retail outlet is the data entry aspect. Tech data entry India provides a number of products and services to cater to the Magento Data Entry Services.

    ReplyDelete
  11. Nice Blog very useful Thanks....! Such a good information you have posted.

    Magento Development Company : https://www.biztechcs.com/magento-development/

    ReplyDelete
  12. Nice information shearing in this blog post...thanks for this post...i am happy read this blog post...Magento Sverige

    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)

Magento: How to fix "The requested URL /index.php was not found on this server" error