"Lit the Candle"

Can’t login to magento admin after installation.

If the domain is not a true domain then this problem occurs. Its like if you use your localhost to run magento store,then you will face this problem.

You can overcome this by browsing using ur ip address or you can remove these three line from the following page.

app\code\core\Mage\Core\Model\Session\Abstract\varien.php

$this->getCookie()->getDomain(),
$this->getCookie()->isSecure(),
$this->getCookie()->getHttponly()

Comment these lines  line (may be at line 78…);

Hope magento admin will work now on your localhost with the following url. :)

http://localhost/magento/admin/

Just try out and play with your stores……

May 7, 2009 - Posted by milansaha | Magento | | 51 Comments

51 Comments »

  1. Hey thanks, have been struggling these two days to get the solution. It finally worked! cheers

    Comment by Gyan | June 4, 2009 | Reply

  2. HI milansaha,

    Thanks a lot buddy.. its working now… i hv struggled past 3 days in this problem.. feel very happy..

    Thank u so much

    Comment by sasi kumar.c | June 5, 2009 | Reply

  3. Hi….
    thank you so much…..

    Comment by abudis | July 3, 2009 | Reply

  4. Thanks a bunch.
    It now works correctly (though it is slow as hell locally)

    This should really be mentioned in guides on how to install Magento on Wampserver

    Comment by Kilroy | July 6, 2009 | Reply

    • hi
      dear

      How are you. I want to talk you

      regards
      nasir

      Comment by Nasir | July 11, 2009 | Reply

      • @ nasir….u can leave your queries here and i will reply you.
        You can also reach me : milan.saha@gmail.com

        Comment by Milan | August 16, 2009

  5. You are the man!

    Comment by vlad | July 8, 2009 | Reply

  6. Thanks a lot to give me my login problem sonve. 12 hours trying

    Comment by Nasir | July 11, 2009 | Reply

  7. Hello…all of u are welcome !

    @ nasir….u can leave your queries here and i will reply you.
    You can also reach me : milan.saha@gmail.com

    Comment by milansaha | July 11, 2009 | Reply

  8. Hey, thanks for this. I found safari worked fine with no modification, but firefox would not work without altering the session_set_cookie_params as suggested.

    In 1.3.2.2 I had to comment all lines of those params from line 77 to 84. If I comment just the (3) suggested I got a blank screen. Just a heads up.

    Thanks for adding to the community. I am new to this so you are my saving grace.

    Comment by Jeremy | July 18, 2009 | Reply

  9. Ok, In 1.3.2.2 I had just comment out those three lines that you have told me and it’s worked for me. Thanks for your suggestion. Oh, by the way I am using xampp, Windows XP

    Comment by Avijit | July 21, 2009 | Reply

  10. thank youy very much for your nice & working solution.

    simply a awosome solution.

    again thanks a lot.

    Comment by tasid | July 27, 2009 | Reply

    • Nice to know. You are welcome.

      Comment by milansaha | July 31, 2009 | Reply

  11. Thanks, I tried to replace localhost by 127.0.0.1 and it’s now working.

    I just installed: 1.3.2.3 in WAMP and if you change the locahost “name” then you will be able to log in Admin Zone.

    Comment by Aurelio | July 28, 2009 | Reply

    • Yes…that is also possible because the default IP to browse the apache server on a localhost.

      Comment by milansaha | July 31, 2009 | Reply

  12. Many thanks…!!!

    Comment by brillie | July 31, 2009 | Reply

  13. Thankx Man

    It works

    Comment by Tushar | August 4, 2009 | Reply

  14. Thanks a lot milansaha !! Its saved my time.. ;) Many tanks !

    Comment by Vinny | August 6, 2009 | Reply

  15. if i this 3 line off then ,the following error shown

    “There has been an error processing your request.”

    Comment by csemrm | August 11, 2009 | Reply

    • you might forgot to remove a coma before these line. :)

      Comment by milansaha | August 11, 2009 | Reply

  16. thankssssssss

    Comment by thabetinfo | August 14, 2009 | Reply

  17. Hello brother
    I got another solution for installation in local PC and access admin panel.
    For access admin panel only replace
    http://localhost/magento ->http://192.168.0.1[Local IP]/magento .

    thanks

    Comment by csemrm | August 15, 2009 | Reply

    • That might be working if that IP is assigned to your pc.

      On the other hand by default the IP for any apache server has an IP and that it is 127.0.0.1

      So you can also try with http://127.0.0.1/magento

      Comment by Milan | August 15, 2009 | Reply

  18. Fucking a, thank you so much, what a stupid bug.

    Comment by Backus | August 16, 2009 | Reply

  19. Thanks… had me stumped for ages!

    Comment by Jez | August 26, 2009 | Reply

  20. HI milansaha,

    Thanks a lot….. its working now… i hv struggled 2 hours in this problem.. feel very happy..keep in touch

    Thank u so much

    Comment by Rojan John v | September 8, 2009 | Reply

  21. {{base_url}} is not recommended to use in a production environment to declare the Base Unsecure Url / Base Secure Url. It is highly recommended to change this value in your Magento configuration.

    What will do ?

    Comment by Rojan John v | September 8, 2009 | Reply

    • If you are working on a true hosting i.e. if you have a domain name(www.abc.com) for your site then you just enter that url in this field instead of {{base_url}} .
      Thats it.

      Comment by Milan | September 8, 2009 | Reply

  22. Thank u very very much.It works finally.It saves me lots of headache.

    Comment by Saswata | September 9, 2009 | Reply

  23. Thank you very much…..Are u from the magento team?

    Comment by Sheeba | September 16, 2009 | Reply

    • You are welcome. I am not from magento team.
      I am just a developer from Dhaka,Bangladesh.

      Comment by milansaha | September 16, 2009 | Reply

  24. Thanks a lot, man.

    Comment by evoratec | September 16, 2009 | Reply

  25. hi,one more help is needed.
    When we add new files/modules in magento,it is not detecting the changes.How to overcome this problem.

    Comment by Sheeba | September 16, 2009 | Reply

    • It depends on changing to many files. So tough to guess what the exact problem is there.

      Comment by milansaha | September 16, 2009 | Reply

  26. hi.. great man… simply super…

    Comment by Raju | September 18, 2009 | Reply

  27. one more help milan..
    how can i integrate hellopod themes..
    here i downloaded full version of hellopod themes..
    they gave instruction also..
    regards that instruction we need to replace app and skin folders within the root folder..
    i replaced that folder.. but it showing error to me..
    can u help me pls

    Comment by Raju | September 18, 2009 | Reply

    • I guess it should work if you place the files properly.
      Then you have to write the theme name form admin area for your store to see in action.
      If you still face problems then i think there are problems with the xml file for the theme to make the proper template structure in magento layout.

      Comment by Milan | September 18, 2009 | Reply

      • Thanks for imm reply…
        let me check again properly… thanks

        Comment by Raju | September 19, 2009

  28. Thanks my friend

    Comment by Kulk | September 19, 2009 | Reply

  29. Thanks man, i battled with this stuff for 2days.

    Comment by Sophia | September 21, 2009 | Reply

  30. Hey, Thanks a lot, I tried it by setting a enter 127.0.0.1 http://www.localhost.com it also works but if you click on any link it automatically redirects to http://localhost/magento instead of http://www.localhost.com/magento.
    But your solution is perfect

    Comment by Yogesh | October 8, 2009 | Reply

  31. Hi, I have one problem, I need to integrate Indian payment gateway (times of money) in Magento. could you please guide me in how to create module for this? or please tell me where I can find the files of authorized or paypals payment gateway file it may help me to create new module.

    Comment by Yogesh | October 8, 2009 | Reply

  32. Thanks for you tips. Its very useful for new user.

    Comment by M Hussain | October 12, 2009 | Reply

  33. Really useful. :)

    Comment by supunmali | October 15, 2009 | Reply

  34. I am havin this issue, that I did add the modern theme. But now i cannot change back to default theme, i did get when I first installed magento. How can I get it? Even I cannot change to another theme. It gives errors in the front end view.

    Why is it? I did change Default in Design to default get the default theme. (For modern theme I changed it to Modern) after adding the extension.

    Comment by supunmali | October 15, 2009 | Reply

    • I guess the problem may occur due to improper configuration from the admin area or for any other error in the page.xml file.Firstly you need to make sure that you placed all the files for the new theme in the proper directories and then you have to enter the theme name from the admin area.

      Thats it. Your theme should be in action. :)

      Comment by milansaha | October 16, 2009 | Reply

      • Thanks a lot.. It worked.. had to change the page setup and after deleting the cache it worked. :)

        Comment by supunmali | October 21, 2009

  35. Good one, this fixed the issue in a jiffy

    These are precisely the lines one needs to comment in the file varien.php (the ones starting with // are commented). Also remember to take out the comma from the end of the line $this->getCookie()->getPath()

    session_set_cookie_params(
    $this->getCookie()->getLifetime(),
    $this->getCookie()->getPath()
    //$this->getCookie()->getDomain(),
    //$this->getCookie()->isSecure(),
    //$this->getCookie()->getHttponly()
    );

    Thanks

    Comment by Bedanta | October 15, 2009 | Reply

  36. Work, thanks!

    Comment by Pablo Veintimilla | October 24, 2009 | Reply

  37. Wow its work
    thanks alot ;)

    Comment by Abdelkarim | October 26, 2009 | Reply


Leave a comment