Search code examples
urlwampbackendmagento2magento-2.0

incorrect url showing after magento 2 fresh installation with backend login error


I have installed the newest version of magento 2.0 in wamp environnement. Enabled a lot of php and apache module needed to run it . such like rewrite module and mcrypt.so . I'm using wamp and the php version used is 5.5 and apache 2.4 . I still have incorrect url when I navigate in this fresh installation . They are like : example backend login

http://domain/admin_ping/admin/index/index/key/af9c4250635a6d9ff365d4f4eb65bffd75a032bac/

forgot password

http://domain/admin_ping/admin/auth/forgotpassword/

although I'm sure that I have the right login/password, I can't login to the backend I have this error :

You did not sign in correctly or your account is temporarily disabled.

Solution

  • The issue with the magento setup, when you install magento first time, and set a password and confirmation password, is that it stores a wrong password in the database.

    Solution

    edit the file: \vendor\zendframework\zend-crypt\src\Utils.php

    and echo the variables $expected and $actual and check if they have equal values.

    if yes, they do not match; change line 35:

    if (function_exists('hash_equals')) {
        return hash_equals($expected, $actual);
    }
    

    To

    if (function_exists('hash_equals')) {
        return true;
    }
    

    for direct access to magento admin with any password, and then change password and revert back the code changes.

    This solution worked for me.