0

I'm running into an issue on Magento 2.2.7 after a failed rollback from 2.3

Exception: Not supported cipher version in /vendor/magento/framework/Encryption/Encryptor.php:135

Current PHP version is 7.1. I've tried 7 and 7.2
I've cleared var/cache and var/page_cache

How can I clear this error please?

2

In my case this came from an inconsistency between magento version of DB and Source.

I had a 2.3.0 database with a 2.2.6 code.

  • So how did you resolve it? I understand you upgraded to 2.3 and then later tried to go back to 2.2.6, but how did you actually resolve it? In my case, I reinstalled 2.1 and restored the 2.1 database and still get the same error. – David Tay May 10 '19 at 19:22
  • This is not a resolution and should not be the accepted answer. The advise should be to make sure you are on the correct branch for your database. If you have a database on a newer version, but the code is old then the chances are you are checked out to the wrong branch. – Tisch Aug 10 '19 at 10:16
  • This is the right reason of the issue, but doesn't contain the resolve. Check "Peter Lembke" answer below for the resolve. – fudu Nov 14 '19 at 8:01
12

If you run code for Magento 2.2.x on a Magentyo 2.3.x database then some of the encrypted strings in table core_config_data might use a cipher that is not available in Magento 2.2.x

In Magento 2.2.x you have three cipher methods numbered from 0 to 2. Magento 2.3 support more chipher methods.

If you run:

select * from core_config_data where value like '%0:3:%'

then you can see if the database contain any config settings that Magento 2.2.x can not decrypt.

In my case I had a Magento 2.2.6 database except for the core_config_data that came from a Magento 2.3.1 database. I could just delete those strings and lose those settings.

update core_config_data set value = '' where value like '%0:3:%'
  • This indeed is the right answer. – Ahsan Horani Sep 12 '19 at 11:55
0

Similar to others, I experienced this problem while upgrading from 2.2.8 to 2.3.1 and in my case, I needed to restart php-fpm and nginx to fix it. I use an automated build tool that creates versioned directories to deploy Magento to. So while the database base was upgraded to 2.3.1, due to caching within php-fpm/nginx, the web server still pointed to the older 2.2.8 (i.e. previous version) release folder.

0

I've come across with this problem today when I imported a Magento 2.3.2 database in a Magento 2.2.9 code.

So, I updated the Magento from 2.2.9 to version 2.3.2 following Magento 2.3 docs: https://devdocs.magento.com/guides/v2.3/comp-mgr/cli/cli-upgrade.html

After that, you need to refresh the cache. In my case I use Redis, so I typed on the terminal the command redis-cli flushall and Magento is working fine now.

-2

You need to revert the changes in the etc/config.php and etc/env.php file. And clear all cache. It will resolve the issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.