I can't log into my local copy of Magento — how to use lost password with local copy of software?

有些话、适合烂在心里 提交于 2019-12-02 07:07:56

问题


I have a local install of Magento on my Mac using MAMP. I need to retrieve my password, but the lost password is obviously not working out of the box.

Is there a way with MAMP to use the lost password feature (e.g. by activating a mail sever)?


回答1:


The default login is : admin The default password is : 123123

If you are having troubles and want to reset it to a different password, just run at your sql database:

SELECT * FROM admin_user;

Then, find the username you want to modify in the listing provided - 'admin' in this example. Then, to update the password, type:

UPDATE admin_user SET password=CONCAT(MD5('qXpassword'), ':qX') WHERE username='admin';

'qX' would be changed to whatever you want it to be and same goes for 'password'

You can also do this in phpMyAdmin, find the admin_user field and choose MD5 when updating password.

Source




回答2:


Here's a dirty fix courtesy of Rick Torres which worked for me...

Open file... /app/code/core/Mage/Core/Model/Session/Abstract/Varien.php

Around line 100 you will find...

call_user_func_array('session_set_cookie_params', $cookieParams);

Comment it out like this...

//call_user_func_array('session_set_cookie_params', $cookieParams);

And you're done.

Bear in mind that hacking core files like this is not ideal as when you update to a newer version of Magento this file may be overwritten. Also remember to uncomment the line when you move the site to a live server ;)



来源:https://stackoverflow.com/questions/4631270/i-cant-log-into-my-local-copy-of-magento-how-to-use-lost-password-with-local

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!