I have got admin login screen. and I had changed the password in “admin_user” table. But I am unable to login witht same user id or password. Pls help me
I was having the same problem with 1.7.0.2 and found that editing app/code/core/Mage/Core/Model/Session/Abstract/Varien.php as suggested in this thread does allow you to log in, but it does not resolve the underlying issue, which has to do with session cookie lifetimes. Another way to resolve the issue, without changing any code, is to go into database and update the core_config_data table to change the session cookie lifetimes. You can do this by first checking to see if a value exists for this attribute, and if it does, update the attribute, if it does not exist, just add it. The following is what I did for Magneto 1.7.0.2 using CentOS 6.3 and MySQL, setting the value to 84600:
SELECT * FROM core_config_data WHERE path='web/cookie/cookie_lifetime';
If no value is returned then add the attribute to the table:
INSERT INTO core_config_data VALUES ('','default','0','web/cookie/cookie_lifetime','84600');
If a value was returned then update the existing value:
UPDATE core_config_data SET value='84600' WHERE path='web/cookie/cookie_lifetime';
When you are done make sure to clear the cache and session folders, or you will continue to loop. It probably wouldn’t hurt to clear your browser’s cookies as well.
Thanks for the tip. I’m also running 1.7.0.2 and tried updating the db values for cookie_lifetime and it didn’t help. That issue may be specific to CentOS as I’m running my local install on Windows. The only thing that works for me is updating the app/code/core/Mage/Core/Model/Session/Abstract/Varien.php file. Instead of commenting out starting at line 88 I started it below the $cookieParams array and right before the if block at line 94:
/*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(); }*/
I’d prefer to not have to edit the code like this which is why I was hoping that the db entry would fix it. Maybe someone else knows of a fix that doesn’t require these edits.
I have got admin login screen. and I had changed the password in “admin_user” table. But I am unable to login witht same user id or password. Pls help me
Hi, you can not changed the password in database, because the password have been encrypt. If you can not login by forgot password, you can use forgot password feature, then new password will be emailed to you.
Thanks
I am newbie designer in Magento. I was facing the same problem and cannot login to admin in my Windows XP. After reading this thread, it has helped in logging to admin.
Yes this worked for me. Thank you so much!!!!
Using Magento 1.7.0 on a Godaddy Dedicated Server. Not a Localhost.
Just moved the Magento site from one domain to another and could not login to the admin afterwords.
I also had to change the table in the database core_config_data and change the old url to the new url in 4 spots
Thanks for the tip. I’m also running 1.7.0.2 and tried updating the db values for cookie_lifetime and it didn’t help. That issue may be specific to CentOS as I’m running my local install on Windows. The only thing that works for me is updating the app/code/core/Mage/Core/Model/Session/Abstract/Varien.php file. Instead of commenting out starting at line 88 I started it below the $cookieParams array and right before the if block at line 94:
/*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(); }*/
I’d prefer to not have to edit the code like this which is why I was hoping that the db entry would fix it. Maybe someone else knows of a fix that doesn’t require these edits.
That’s work for me as well. Thanks to share the solution. Hopefully, Magento can fix it in next version.
Comment these lines of codes and login again. It will work perfectly.if you will face any issue again then, you can contact us as we are one of the magento extension developers.
I’m facing the same problem. Perfectly easy installation, but I can’t login the admin after installation. I read all posts in this section, as far as I can see my line of code looks the same as provided below. I still face the login problem. Anyone any idea on how to solve this problem?
Thanks!
Monty22 - 07 February 2013 11:27 AM
Hi,
if you are unable to login to admin panel of Magento after a fresh installation on localhost, then go the file
Comment these lines of codes and login again. It will work perfectly.if you will face any issue again then, you can contact us as we are one of the magento extension developers.