Skip to content
Advertisement

Magento 2 Installation – Key must not exceed 56 bytes

I’m having issues installing Magento 2 via command line. When setup is running it gets to:

Module ‘Magento_Indexer’: Running recurring..

And it throws an error:

[MagentoFrameworkExceptionLocalizedException]
Key must not exceed 56 bytes.

I have searched around and couldn’t find any clues as to what it can be. I thought the –key might be too long for Magento setup but I have tried the setup without –key, as it is optional but the error still occurs.

2016/07/08 14:42:49 [error] 30074#30074: *1 FastCGI sent in stderr: “PHP message: PHP Fatal error: Uncaught exception ‘MagentoFrameworkExceptionLocalizedException’ with message ‘Key must not exceed 56 bytes.’ in /magento/lib/internal/Magento/Framework/Encryption/Crypt.php:58 Stack trace:

0 /magento/lib/internal/Magento/Framework/Encryption/Encryptor.php(401): MagentoFrameworkEncryptionCrypt->__construct(‘oon5eeRee7yiemo…’, ‘blowfish’, ‘ecb’, false)

1 /magento/lib/internal/Magento/Framework/Encryption/Encryptor.php(313): MagentoFrameworkEncryptionEncryptor->getCrypt(‘oon5eeRee7yiemo…’, 0, false)

2 /magento/app/code/Magento/Config/Model/Config/Backend/Encrypted.php(107): MagentoFrameworkEncryptionEncryptor->decrypt(‘PayPal’)

3 /magento/lib/internal/Magento/Framework/App/Config/MetadataProcessor.php(86): MagentoConfigModelConfigBackendEncrypted->processValue(‘PayPal’)

4 /magento/lib/internal/Magento/Framework/App/Config/Data.php(32): MagentoFrameworkAppConfigMetadataPr” while reading response header from upstream, client: 127.0.0.1, server: www.magentotest.com, request: “GET /setup/ HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9000”, host: “www.magentotest.com”

If anyone could help that would be great, thank you!

Advertisement

Answer

app/etc/env.php is populated with the details of your installation. Look at the contents crypt, and make sure that key doesn’t have multiple lines appended to it, as was the case in my new installation, after running the setup:install multiple times.

Changing this key for a current install would obviously be a bad idea. If this fixes you out, please let me know so I can log a ticket.

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement