invalid login or password Mcrypt error

2019-02-21 03:56发布

问题:

I' facing an issue with registered Customer through checkout.

After the checkout process, the customer lands in “My Account” but once logged off, he can’t acces "My Account" anymore, the message "Invalid login or password" is displayed.

Setting a new password through “Forgotten Password” button seems to solve the problem for the customer.

The system.log file is displaying:

Warning: mcrypt_generic_init(): Key size is 0  in /lib/Varien/Crypt/Mcrypt.php on line 94
Warning: mcrypt_generic_init(): Key length incorrect  in /lib/Varien/Crypt/Mcrypt.php on line 94
Warning: mcrypt_generic_deinit(): 495 is not a valid MCrypt resource  in /lib/Varien/Crypt/Mcrypt.php on line 135
Warning: mcrypt_module_close(): 495 is not a valid MCrypt resource  in /lib/Varien/Crypt/Mcrypt.php on line 136

I thought it might be relative to my server configuration, but it's not the case as by installing a fresh Magento in a folder in the root of the same installation is doing its job properly with the same server configuration and Mcrypt.php. Moreover, the password set during registration with form (?and using the same encryption?), is set properly.

Any suggestion bout how to solve this problem?

回答1:

Got it!

The encryption field was empty in app/etc/local.xml

<crypt>
    <key><![CDATA[]]></key>
</crypt>

So, placed the encryption key of the fresh installation I did in my subfolder and it solved the issue.

<crypt>
    <key><![CDATA[encryption_key]]></key>
</crypt>

I don't know what happened during the first installation of Magento on my server, I've double checked in my backups and there's nothing here from the beginning.

I hope nothing else has failed during installation, any suggestion of files generated during installation I should look at?