skip to Main Content

After login with correct credential, I cannot login into admin panel. Here is the error message I am getting:

1 exception(s):
Exception #0 (Exception): Notice: Undefined offset: 2 in D:XampphtdocsdemowebsesprojnamevendormagentoframeworkEncryptionEncryptor.php on line 588

6

Answers


  1. Usually, it happens when you get a database from another environment with the different PHP version, and admin user has been created there. E.g. you have PHP 7.1 and the admin user has been created with PHP 7.2.
    Just create the user in your environment or switch to the same PHP version.

    Login or Signup to reply.
  2. I had the same issue. Resolved it by creating a new admin user using terminal and using that new user to login backend.

    php bin/magento admin:user:create --admin-user=john --admin-password=doe123445 
      [email protected] --admin-firstname=John --admin-lastname=Doe
    
    Login or Signup to reply.
  3. I installed the sodium extension for PHP and after restarting PHP and nginx this error no longer appeared. My version of PHP is PHP 7.1.30 and the command I ran was:

    sudo apt-get install php7.1-sodium -y
    
    Login or Signup to reply.
  4. after upgrade magento 2.x.x to to any higher version you should first Make sure you run the upgrade command
    php bin/magento setup:upgrade
    php bin/magento setup:setup:static-content:deploy -f
    php bin/magento setup:di:compile

    if stile error exists check your php version it should be 7.2.x
    hope it will solve your issue!

    Login or Signup to reply.
  5. I had same issue and creating new user did not help me. However, updating the password and clearing cache worked for me. I used below SQL to update my password:

    UPDATE admin_user SET password = CONCAT(SHA2('xxxxxxxxNewPassword', 256), ':xxxxxxxx:1') WHERE username = 'username';
    
    Login or Signup to reply.
  6. update admin password in admin_user table "6f92815f581710d238a9837aa079e722dd5bec27e6717cfa6c691f04b4993797:ZrBkBsjOa8M5izHd4qjhXsSG1uGZgPZY:1". this password is "admin123"

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search