5

I had a perfectly good and running magento 2.0.2 CE but after I updated the php version from php5.6 to php7.0 everything stopped working and i get the fallowing output in the var/report/errornumberfile:

a:4:{i:0;s:168:"Notice: Use of undefined constant MCRYPT_BLOWFISH - assumed 'MCRYPT_BLOWFISH' in /magento_server_dir/vendor/magento/framework/Encryption/Encryptor.php on line 397";i:1;s:3415:"#0 /magento_server_dir/vendor/magento/framework/Encryption/Encryptor.php(397): Magento\Framework\App\ErrorHandler->handler(8, 'Use of undefine...', '/var/www/html/m...', 397, Array)
#1 /magento_server_dir/vendor/magento/framework/Encryption/Encryptor.php(313): Magento\Framework\Encryption\Encryptor->getCrypt('ee4e3ea10ae0cdd...', 0, false)
#2 /magento_server_dir/vendor/magento/module-config/Model/Config/Backend/Encrypted.php(107): Magento\Framework\Encryption\Encryptor->decrypt('PayPal')
#3 /magento_server_dir/vendor/magento/framework/App/Config/MetadataProcessor.php(86): Magento\Config\Model\Config\Backend\Encrypted->processValue('PayPal')
#4 /magento_server_dir/vendor/magento/framework/App/Config/Data.php(32): Magento\Framework\App\Config\MetadataProcessor->process(Array)
#5 /magento_server_dir/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(99): Magento\Framework\App\Config\Data->__construct(Object(Magento\Framework\App\Config\MetadataProcessor), Array)
#6 /magento_server_dir/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(89): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Magento\\Framewo...', Array)
#7 /magento_server_dir/vendor/magento/framework/ObjectManager/ObjectManager.php(57): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Framewo...', Array)
#8 /magento_server_dir/vendor/magento/framework/App/Config/DataFactory.php(46): Magento\Framework\ObjectManager\ObjectManager->create('Magento\\Framewo...', Array)
#9 /magento_server_dir/vendor/magento/framework/App/Config/ScopePool.php(90): Magento\Framework\App\Config\DataFactory->create(Array)
#10 /magento_server_dir/vendor/magento/module-backend/App/Config.php(41): Magento\Framework\App\Config\ScopePool->getScope('default', NULL)
#11 /magento_server_dir/vendor/magento/module-backend/App/Area/FrontNameResolver.php(82): Magento\Backend\App\Config->getValue('admin/url/use_c...')
#12 /magento_server_dir/vendor/magento/module-backend/Helper/Data.php(206): Magento\Backend\App\Area\FrontNameResolver->getFrontName(false)
#13 /magento_server_dir/vendor/magento/module-backend/App/Request/PathInfoProcessor.php(46): Magento\Backend\Helper\Data->getAreaFrontName()
#14 /magento_server_dir/var/generation/Magento/Backend/App/Request/PathInfoProcessor/Proxy.php(95): Magento\Backend\App\Request\PathInfoProcessor->process(Object(Magento\Framework\App\Request\Http), '/index.login.ac...')
#15 /magento_server_dir/vendor/magento/framework/App/Request/Http.php(161): Magento\Backend\App\Request\PathInfoProcessor\Proxy->process(Object(Magento\Framework\App\Request\Http), '/index.login.ac...')
#16 /magento_server_dir/vendor/magento/framework/HTTP/PhpEnvironment/Request.php(194): Magento\Framework\App\Request\Http->setPathInfo()
#17 /magento_server_dir/vendor/magento/framework/App/Request/Http.php(204): Magento\Framework\HTTP\PhpEnvironment\Request->getPathInfo()
#18 /magento_server_dir/vendor/magento/framework/App/Http.php(110): Magento\Framework\App\Request\Http->getFrontName()
#19 /magento_server_dir/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
#20 /magento_server_dir/pub/index.php(37): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#21 {main}";s:3:"url";s:19:"/index.login.action";s:11:"script_name";s:10:"/index.php";}

Does someone knows the solution to this problem ? Any help is appreciated. Thank you!!

  • 1
    Have you installed the mcrypt extension for php7? – lloiacono Feb 9 '16 at 11:03
  • i figured that was the problem but i haven't found the correct way to install that extension for php7. can you help me with this ? – Lachezar Raychev Feb 9 '16 at 11:09
  • How did you installed php7 ? What OS are you running? Are you using php-mod or php-fpm? Anything else about your system that you could tell me? – lloiacono Feb 9 '16 at 11:10
13

How did you installed php7 ? What OS are you running? Are you using php-mod or php-fpm?

If you are running ubuntu and you installed using PPA, then try this

Check if mcrypt module is there:

php -m | grep mcrypt 

If not then install mcrypt:

sudo apt-get install php7.0-mcrypt

Then enable the module:

phpenmod mcrypt

Then restart php.

  • that solved the problem. thank you. OS is Ubuntu 14.04 LTS – Lachezar Raychev Feb 9 '16 at 11:11
  • 1
    I had the same problem and many other modules were missing, so you can install them the same way as described above just change the module name – lloiacono Feb 9 '16 at 11:22
  • Do you have any idea why after I update to php 7.0 none of the commands for magento work in terminal ? Like all of the fallowing are not working : php bin/magento list, php7.0 bin/magento list, php7 bin/magento list. It gives output in console like:"Content-type: text/html; charset=UTF-8 bin/magento must be run as a CLI application" And that is it.... I really don't get it... when i try to install php7.0-cli it says "php7.0-cli is already the newest version." ... wtf – Lachezar Raychev Feb 10 '16 at 15:16
  • not really, I will check, but post this as a separate question as it seems as a different topic and there might be others that can provide an answer – lloiacono Feb 10 '16 at 15:50

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.