cancel
Showing results for 
Search instead for 
Did you mean: 

Upgrade magento from 2.2.3 to 2.3 using command line issues

Upgrade magento from 2.2.3 to 2.3 using command line issues

Hi,

I am upgrading the magento from 2.2.3 to 2.3 using command line in localserver as per this reference link

http://www.codextblog.com/magento-2/upgrade-magento-version-2-2-x-2-3-0/ .
php version for required for magento 2.3 is php 7.2 , and my localserver php version is:
PHP Version 7.2.27-1+ubuntu18.04.1+deb.sury.org+1

I have followed all the steps as per the above given reference link but in step 6 as I using the command -
php bin/magento setup:upgrade

Step 6: Clear cache and regenerate code.

php bin/magento setup:upgrade
After running this command it shows the errors.

PHP Fatal error: Uncaught Error: Call to undefined function Magento\Framework\Encryption\mcrypt_module_open() in /var/www/html/venoor/vendor/magento/framework/Encryption/Crypt.php:59
Stack trace:
#0 /var/www/html/venoor/vendor/magento/framework/Encryption/Encryptor.php(401): Magento\Framework\Encryption\Crypt->__construct('21048dae9013bbe...', 'MCRYPT_RIJNDAEL...', 'MCRYPT_MODE_CBC', 'gsLinqLEzEIfffO...')
#1 /var/www/html/venoor/vendor/magento/framework/Encryption/Encryptor.php(313): Magento\Framework\Encryption\Encryptor->getCrypt('21048dae9013bbe...', 2, 'gsLinqLEzEIfffO...')
#2 /var/www/html/venoor/vendor/magento/module-config/Model/Config/Backend/Encrypted.php(113): Magento\Framework\Encryption\Encryptor->decrypt('OiNuTLMClOcKG4U...')
#3 /var/www/html/venoor/generated/code/Magento/Config/Model/Config/Backend/Encrypted/Interceptor.php(37): Magento\Config\Model\Config\Backend\Encrypted->processValue('0:2:gsLinqLEzEI...')
#4 /var/www/html/venoor/vendor/magento/framework/App/Config/MetadataConfigTypeProcessor.php(123): Magent in /var/www/html/venoor/vendor/magento/framework/Encryption/Crypt.php on line 59

so could, you please help me to resolve these issue and upgrade the magento from 2.2.3 to 2.3

Thanks

15 REPLIES 15

Re: Upgrade magento from 2.2.3 to 2.3 using command line issues

Could you please check if PHP Mcrypt module is loaded or not.

 

You can check using the below code to check if function exists or not. .

if(function_exists('mcrypt_encrypt')) {
echo "mcrypt is loaded!";
} else {
echo "mcrypt isn't loaded!";
}

If not, you need to install Mcrypt module.

Re: Upgrade magento from 2.2.3 to 2.3 using command line issues

Yes, I have checked it using the phpinfo() and it shows the mcrypt is enabled. please check the screenshot link https://prnt.sc/qvffcs

Re: Upgrade magento from 2.2.3 to 2.3 using command line issues

Hello @developer1607 

 

Are you using same php version for cli and browser?

 

if not then set that php version

 


Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer

Re: Upgrade magento from 2.2.3 to 2.3 using command line issues

Mcrypt is removed from PHP 7.2. It may possible that its not properly installed on correct Path OR you may have multiple PHP versions installed.

Can you please check below links:

 

https://support.magento.com/hc/en-us/articles/360034280132-The-PHP-mcrypt-extension-is-not-installed...

 

https://www.php.net/manual/en/intro.mcrypt.php

 

Hope this help !!

Re: Upgrade magento from 2.2.3 to 2.3 using command line issues

Hi,
I am using the same php version for CLI and browser.

Re: Upgrade magento from 2.2.3 to 2.3 using command line issues

@developer1607 

 

check your php log may be that extension not loaded 


Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer

Re: Upgrade magento from 2.2.3 to 2.3 using command line issues

@ppareekI have checked only one php version 7.2 is installed.

Re: Upgrade magento from 2.2.3 to 2.3 using command line issues

@Sunil Patel  I have checked it the extension is already loaded shown enabled in using phpinfo() .

Re: Upgrade magento from 2.2.3 to 2.3 using command line issues

Hello @developer1607 

 

Try to one thing rename env.php and config.php so it will ask to install magento and on first step Magento will check all pre condition.

 

Hope it will help you.

 

 


Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer