Magento Admin login problem

I had a new installation of magento. But I was unable to login as an administrator. I went to the admin login page, entered correct username and password but was redirected to the same login page.
Error message is displayed when I enter wrong username or password. But nothing is displayed and I am redirected to the same login page when I insert correct username and password.

luckily i found solutions:

The solution is to modify the core Magento code.
Open app/code/core/Mage/Core/Model/Session/Abstract/Varien.php. Comment out the lines 80 to 83.
The line number may vary according to the Magento version. But these lines are present somewhere near line 80. You have to comment the comma (,) in line:
 $this->getCookie()->getPath()//,   
 // set session cookie params  
 session_set_cookie_params(  
 $this->getCookie()->getLifetime(),  
 $this->getCookie()->getPath()//,  
 //$this->getCookie()->getDomain(),  
 //$this->getCookie()->isSecure(),  
 //$this->getCookie()->getHttponly()  
 );  

In you have Magento 1.4 then you have to comment code from line 86 to 98,
 /* if (!$cookieParams['httponly']) {  
   unset($cookieParams['httponly']);  
   if (!$cookieParams['secure']) {  
     unset($cookieParams['secure']);  
     if (!$cookieParams['domain']) {  
       unset($cookieParams['domain']);  
     }  
   }  
 }   
 if (isset($cookieParams['domain'])) {  
   $cookieParams['domain'] = $cookie->getDomain();  
 } */  
Well, This was solved my problem, hope, this solution you also...

Cheers,
Gaurav :)

Comments

  1. Thanks for the best blog.it was very useful for me.keep sharing such ideas in the future as well.Nice images with good designs.Magento Themes

    ReplyDelete
  2. Thanks for your feedback.! It encourage me to write more in blog..
    I'm glad it helps to you.!

    ReplyDelete
  3. it's not working .....i'm getting error.


    http://phperrorandsolution.blogspot.in/

    ReplyDelete
  4. Hi Dude,

    Sorry , dont want to discourage you, but dont you think rather then commenting the code, we should dig into it and find out what exactly it is doing, so that we can find the actual problem??


    Thanks

    Rahul Anand

    ReplyDelete
  5. @rahul,
    yes, i agree with you!
    Please let me know if you have then!

    this is just a way to solve the issue quickly. Apply this for quick solutions and try to find more better solutions.... This is nit only one solutions.. Okay

    I guess you find better solutions very quickly. Please don't forgot to add it into comment, I'm wait for better solutions!!!!!

    ReplyDelete
  6. This is not the solution as I have to versions of the same store. One have the problem and the other does not. The file app/code/core/Mage/Core/Model/Session/Abstract/Varien.php. is exactly the same on both stores.
    This time I solved the problem by clearing the cache and cookies in my browser.

    ReplyDelete
  7. The article is good to read and worth sharing
    Magento Developers

    ReplyDelete
  8. This article was very helpful in answering alot of questions regarding Magento Integration

    ReplyDelete
  9. Hi Gaurav

    Thank you for your solution. It did not worked for me,
    May be you can try solution given at Magento Coders

    Visit Us : Magento Ecommerce Development India | Parsys Media

    ReplyDelete
  10. http://www.dangalfullmovie.in
    http://www.dangalfullmovie.in/2016/07/dangal-movies-aamir-khans-look-star.html
    http://www.dangalfullmovie.in/2016/06/dangal-movie-lead-actor-role-aamir.html
    http://www.dangalfullmovie.in/2016/06/dangal-full-movie-download-in-hd.html
    http://www.dangalfullmovie.in/2016/06/dangal-full-movie-collection.html
    http://www.dangalfullmovie.in/2016/06/dangal-movie-release-date-aamir-khans.html

    ReplyDelete
  11. http://www.dangalfullmovie.in
    http://www.dangalfullmovie.in/2016/07/dangal-movies-aamir-khans-look-star.html
    http://www.dangalfullmovie.in/2016/06/dangal-movie-lead-actor-role-aamir.html
    http://www.dangalfullmovie.in/2016/06/dangal-full-movie-download-in-hd.html
    http://www.dangalfullmovie.in/2016/06/dangal-full-movie-collection.html
    http://www.dangalfullmovie.in/2016/06/dangal-movie-release-date-aamir-khans.html

    ReplyDelete
  12. This comment has been removed by the author.

    ReplyDelete
  13. This comment has been removed by the author.

    ReplyDelete
  14. This comment has been removed by the author.

    ReplyDelete
  15. This comment has been removed by the author.

    ReplyDelete
  16. http://ahappydiwali2016.beep.com/
    http://ahappydiwali2016.weebly.com/our-story.html/
    https://ahappydiwali2016.wordpress.com/2016/09/02/diwali-quotes-in-hindi/
    http://ramesh20.doodlekit.com/blog/entry/4035008/diwali-massages-in-hindi/
    http://ahappydiwali2016.pointblog.net/diwali-status-in-hindi-1534818/
    http://ramesh.blogocial.com/happy-diwali-sms-in-hindi-1636257/
    http://twjhv7z26.biennale.info/news/
    http://ahappydipwali2016.yolasite.com/
    http://ahappydiwali2016.emyspot.com/
    http://www.blogster.com/rameshyadav/diwali-status-in-hindi-2016/
    http://ahappydiwali2016.angelfire.com/
    http://elegantbouquetpeach.tumblr.com/
    http://ahappydiwali2016.jimdo.com/

    ReplyDelete
  17. http://analyticalfiguresp08.blogspot.in/2008/04/week-7-pelvis-hip-structure-demo.html

    ReplyDelete
  18. Very nice post.Thanks for sharing...
    Check out the best collection of Love Quotes, Status, Wishes, Messages, Greetings, HD Images and poems for him for facebook and Whatsapp that can be sent to your friends and beloved ones at LOVE . Have a look at the article and wish him everyday with lots of love and make his every day special.

    ReplyDelete
  19. Pretty nice information. it has a better understanding. thanks for spending time on it.
    lehenga blouse designs
    happy married life images
    Love Quotes for Husband

    ReplyDelete
  20. Exclusive Collection of Salwar Suit and Many More…
    We Have Some For You In Your Budget For more…
    Plz visit:- Salwar Kameez

    ReplyDelete
  21. Exclusive Collection of Salwar Suit and Many More…
    We Have Some For You In Your Budget For more…
    Plz visit:- Patiyala Dress

    ReplyDelete
  22. The best collection of Happy Mothers Day 2017 Images, Photos, Pictures, Wallpapers, Mothers Day Quotes, Wishes, Messages, Greetings,
    Happy Mothers Day Poems & Sayings, Mothers Day Messages, SMS, Text Messages,
    happy fathers day images
    happy fathers day image
    fathers day pictures 2017
    fathers day cards 2017
    father day images free
    happy fathers day quotes
    happy fathers day message
    happy fathers day to my husband
    happy fathers day wishes
    father's day quote
    eid mubarak 2017
    Mothers Day WhatsApp Status & Facebook Status, DP Images,
    Mothers Day FB Profile Pics, FB Timeline Cover Photos etc.

    ReplyDelete
  23. We offers first and exclusive access to the world's most fascinating homes. from royal estates to artist's lofts and everything between - we dedicated to bringing its readers the best in style and design.
    Architecture and Design

    ReplyDelete
  24. You share informative blog thanks for shaie this.Thank you.
    For Marrige party Bajuband

    ReplyDelete

  25. Designer Pakistani Dresses is perhaps the desire of every single girl in this world to look amazing on her wedding day.
    It is certainly important that the bride must be the star of the show.The most beautiful woman at the wedding venue.
    In India,Pakistani Dresses are the most obvious choice for the brides.There are many Pakistani Dresses in our site...
    For more...
    Plz visit:- Pakistani Dresses

    ReplyDelete
  26. You can buy from our large and diverse collection of salwar kameez, party wear suits, bollywood collection, cotton kurtis, Anarrkali suits,Bollywood saree and many other products.....
    We Have Some For You In Your Budget
    For more…
    Anarkali Dress
    Punjabi Dress
    Wedding Saree
    Lehenga Choli
    Ghagra Choli
    Silk Saree
    Ladie Suit
    Indian Saree
    Designer Dress
    Bridal Dresses

    ReplyDelete
  27. In Our site we have Fancy and Traditional Lehenga, All types of Salwar Suit, Designer Saree, Kurti...
    We Have Some For You In Your Budget
    For more…
    Designer Kurtis
    Kurtis
    Wedding Dress
    Punjabi Suits
    Anarkali Dress
    Punjabi Dress
    Wedding Saree
    Lehenga Choli

    ReplyDelete
  28. There are many types of festivals celebrated in India like International, regional, seasonal and religious.
    So Check out In our Article Awesome Wishes, Status and images of all Famous festival...
    Happy Diwali Images
    Merry Christmas Wishes
    Happy New Year 2018





    ReplyDelete
  29. Industry of movies offers numerous kinds of movies.
    These are particular genres of movies which entertain us.
    They make us laugh, make us cry and sometimes makes us scare also, but in any case we get entertained and feel excitement.
    to watch & download Movie...Plz Visit,...
    kingsman: the golden circle full movie hd
    kingsman: the golden circle full movie 2017

    ReplyDelete
  30. Zoho Inventory to Magento Bidirectional stock sync Connector makes syncing data between these clouds a piece of cake.
    Zoho Inventory Magento Integration

    ReplyDelete
  31. You can buy from our large and diverse collection of salwar kameez, party wear suits, bollywood collection, cotton kurtis, Anarkali suits,Bollywood saree and many other products.....
    We Have Some For You In Your Budget....
    For more…
    Plz Visit : Wedding Saree

    ReplyDelete

Post a Comment

Popular posts from this blog

Magento Reindexing problem - take too long time

Magento Navigation menu of CMS pages

Dont want to merge old carts items with current quote