Solved! Go to Solution.
@ann_mar You can ask your hosting provider to make those updates for you. As I said in one of the previous comment you can have different PHP version for Web and command line. This need to be fixed to make the thing working for you.
You can also try command like below. May work otherwise you have to get the version for CLI fixed.
/usr/bin/php7 bin/magento cache:clean
or
/usr/bin/php70 bin/magento cache:clean
Problem solved? Please give 'Kudos' and accept 'Answer as Solution'.
Hello @ann_mar
Have you run the static deploy command again ? after moving on the new server.
Run below commands in sequence :
php bin/magento setup:static-content:deploy -f php bin/magento cache:clean php bin/magento cache:flush
It might works !
Hope it helps !
Hello @ann_mar ,
Please run below command to generate static content deploy
php bin/magento cache:clean php bin/magento cache:flush php bin/magento setup:upgrade rm -rf pub/static/frontend/* pub/static/adminhtml/* var/cache/ var/generation/ var/page_cache/ var/view_preprocessed/ var/composer_home generated/ php -dmemory_limit=6G bin/magento setup:static-content:deploy -f chmod -Rf 777 pub/ var/ generated/ php bin/magento cache:clean
--
If my answer is useful, please Accept as Solution & give Kudos
Hi @ann_mar
Ok - so can you please go to the var/log and you will find the exception.log file over there.
Open that file and post the log over here, so its help us to troubleshoot the issue.
Hope it helps !
Hi @ann_mar
It looks like you have localized exception error, it is generally coming from generation directory !
I would suggest you to run below commands in sequence :
rm -rf generated rm -rf var/cache rm -rf var/page_cache php bin/magento setup:upgrade php bin/magento setup:di:compile php bin/magento setup:static-content:deploy -f php bin/magento cache:clean php bin/magento cache:flush
Try it, it will works !
Hope it helps !
Last entry in the file:
[2019-04-04 14:24:00] main.CRITICAL: Exception: Warning: Use of undefined constant MCRYPT_BLOWFISH - assumed 'MCRYPT_BLOWFISH' (this will throw an Error in a future version of PHP) in /home/annmar/websites/www/bg/vendor/magento/framework/Encryption/Encryptor.php on line 397 in /home/annmar/websites/www/bg/vendor/magento/framework/App/ErrorHandler.php:61 Stack trace: #0 /home/annmar/websites/www/bg/vendor/magento/framework/Encryption/Encryptor.php(397): Magento\Framework\App\ErrorHandler->handler(2, 'Use of undefine...', '/home/annmar/we...', 397, Array) #1 /home/annmar/websites/www/bg/vendor/magento/framework/Encryption/Encryptor.php(313): Magento\Framework\Encryption\Encryptor->getCrypt('002b0efcc538c21...', 0, false) #2 /home/annmar/websites/www/bg/vendor/magento/module-config/Model/Config/Backend/Encrypted.php(109): Magento\Framework\Encryption\Encryptor->decrypt('PayPal') #3 /home/annmar/websites/www/bg/vendor/magento/framework/App/Config/MetadataConfigTypeProcessor.php(88): Magento\Config\Model\Config\Backend\Encrypted->processValue('PayPal') #4 /home/annmar/websites/www/bg/vendor/magento/framework/App/Config/MetadataConfigTypeProcessor.php(106): Magento\Framework\App\Config\MetadataConfigTypeProcessor->processScopeData(Array) #5 /home/annmar/websites/www/bg/vendor/magento/framework/App/Config/PostProcessorComposite.php(34): Magento\Framework\App\Config\MetadataConfigTypeProcessor->process(Array) #6 /home/annmar/websites/www/bg/var/generation/Magento/Framework/App/Config/PostProcessorComposite/Proxy.php(95): Magento\Framework\App\Config\PostProcessorComposite->process(Array) #7 /home/annmar/websites/www/bg/vendor/magento/module-config/App/Config/Type/System.php(166): Magento\Framework\App\Config\PostProcessorComposite\Proxy->process(Array) #8 /home/annmar/websites/www/bg/vendor/magento/module-config/App/Config/Type/System.php(112): Magento\Config\App\Config\Type\System->loadConfig() #9 /home/annmar/websites/www/bg/vendor/magento/framework/App/Config.php(139): Magento\Config\App\Config\Type\System->get('default/web/sec...') #10 /home/annmar/websites/www/bg/vendor/magento/framework/App/Config.php(90): Magento\Framework\App\Config->get('system', 'default/web/sec...') #11 /home/annmar/websites/www/bg/vendor/magento/framework/App/Config.php(103): Magento\Framework\App\Config->getValue('web/secure/use_...', 'default', NULL) #12 /home/annmar/websites/www/bg/vendor/magento/module-store/Model/HeaderProvider/Hsts.php(48): Magento\Framework\App\Config->isSetFlag('web/secure/use_...') #13 /home/annmar/websites/www/bg/vendor/magento/framework/App/Response/HeaderManager.php(41): Magento\Store\Model\HeaderProvider\Hsts->canApply() #14 /home/annmar/websites/www/bg/vendor/magento/framework/Interception/Interceptor.php(123): Magento\Framework\App\Response\HeaderManager->beforeSendResponse(Object(Magento\Framework\App\Response\Http\Interceptor)) #15 /home/annmar/websites/www/bg/var/generation/Magento/Framework/App/Response/Http/Interceptor.php(26): Magento\Framework\App\Response\Http\Interceptor->___callPlugins('sendResponse', Array, Array) #16 /home/annmar/websites/www/bg/pub/errors/report.php(15): Magento\Framework\App\Response\Http\Interceptor->sendResponse() #17 /home/annmar/websites/www/bg/vendor/magento/framework/App/Http.php(324): require('/home/annmar/we...') #18 /home/annmar/websites/www/bg/vendor/magento/framework/App/Http.php(160): Magento\Framework\App\Http->handleGenericReport(Object(Magento\Framework\App\Bootstrap), Object(Exception)) #19 /home/annmar/websites/www/bg/vendor/magento/framework/App/Bootstrap.php(263): Magento\Framework\App\Http->catchException(Object(Magento\Framework\App\Bootstrap), Object(Exception)) #20 /home/annmar/websites/www/bg/index.php(43): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http)) #21 {main} [] [] [2019-04-04 14:24:00] main.CRITICAL: Exception: Warning: Use of undefined constant MCRYPT_BLOWFISH - assumed 'MCRYPT_BLOWFISH' (this will throw an Error in a future version of PHP) in /home/annmar/websites/www/bg/vendor/magento/framework/Encryption/Encryptor.php on line 397 in /home/annmar/websites/www/bg/vendor/magento/framework/App/ErrorHandler.php:61 Stack trace: #0 /home/annmar/websites/www/bg/vendor/magento/framework/Encryption/Encryptor.php(397): Magento\Framework\App\ErrorHandler->handler(2, 'Use of undefine...', '/home/annmar/we...', 397, Array) #1 /home/annmar/websites/www/bg/vendor/magento/framework/Encryption/Encryptor.php(313): Magento\Framework\Encryption\Encryptor->getCrypt('002b0efcc538c21...', 0, false) #2 /home/annmar/websites/www/bg/vendor/magento/module-config/Model/Config/Backend/Encrypted.php(109): Magento\Framework\Encryption\Encryptor->decrypt('PayPal') #3 /home/annmar/websites/www/bg/vendor/magento/framework/App/Config/MetadataConfigTypeProcessor.php(88): Magento\Config\Model\Config\Backend\Encrypted->processValue('PayPal') #4 /home/annmar/websites/www/bg/vendor/magento/framework/App/Config/MetadataConfigTypeProcessor.php(106): Magento\Framework\App\Config\MetadataConfigTypeProcessor->processScopeData(Array) #5 /home/annmar/websites/www/bg/vendor/magento/framework/App/Config/PostProcessorComposite.php(34): Magento\Framework\App\Config\MetadataConfigTypeProcessor->process(Array) #6 /home/annmar/websites/www/bg/var/generation/Magento/Framework/App/Config/PostProcessorComposite/Proxy.php(95): Magento\Framework\App\Config\PostProcessorComposite->process(Array) #7 /home/annmar/websites/www/bg/vendor/magento/module-config/App/Config/Type/System.php(166): Magento\Framework\App\Config\PostProcessorComposite\Proxy->process(Array) #8 /home/annmar/websites/www/bg/vendor/magento/module-config/App/Config/Type/System.php(112): Magento\Config\App\Config\Type\System->loadConfig() #9 /home/annmar/websites/www/bg/vendor/magento/framework/App/Config.php(139): Magento\Config\App\Config\Type\System->get('default/web/sec...') #10 /home/annmar/websites/www/bg/vendor/magento/framework/App/Config.php(90): Magento\Framework\App\Config->get('system', 'default/web/sec...') #11 /home/annmar/websites/www/bg/vendor/magento/framework/App/Config.php(103): Magento\Framework\App\Config->getValue('web/secure/use_...', 'default', NULL) #12 /home/annmar/websites/www/bg/vendor/magento/module-store/Model/HeaderProvider/Hsts.php(48): Magento\Framework\App\Config->isSetFlag('web/secure/use_...') #13 /home/annmar/websites/www/bg/vendor/magento/framework/App/Response/HeaderManager.php(41): Magento\Store\Model\HeaderProvider\Hsts->canApply() #14 /home/annmar/websites/www/bg/vendor/magento/framework/Interception/Interceptor.php(123): Magento\Framework\App\Response\HeaderManager->beforeSendResponse(Object(Magento\Framework\App\Response\Http\Interceptor)) #15 /home/annmar/websites/www/bg/var/generation/Magento/Framework/App/Response/Http/Interceptor.php(26): Magento\Framework\App\Response\Http\Interceptor->___callPlugins('sendResponse', Array, Array) #16 /home/annmar/websites/www/bg/pub/errors/report.php(15): Magento\Framework\App\Response\Http\Interceptor->sendResponse() #17 /home/annmar/websites/www/bg/vendor/magento/framework/App/Http.php(324): require('/home/annmar/we...') #18 /home/annmar/websites/www/bg/vendor/magento/framework/App/Http.php(160): Magento\Framework\App\Http->handleGenericReport(Object(Magento\Framework\App\Bootstrap), Object(Exception)) #19 /home/annmar/websites/www/bg/vendor/magento/framework/App/Bootstrap.php(263): Magento\Framework\App\Http->catchException(Object(Magento\Framework\App\Bootstrap), Object(Exception)) #20 /home/annmar/websites/www/bg/index.php(43): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http)) #21 {main} [] []
Any ideas?
@ann_marSeems like an issue with the server configuration. I would recommend to compare that you have same version of PHP installed as previous server as well as all the PHP modules required are enabled. You can compare the php.ini of both server to find out the same.
Another thing to look into is version of PHP for command line. If you are on a server which have multiple PHP version then chances are there that you may be using older version of PHP for command line.
Once above issues are fixed then try the different command to remove the cache and deploy static file content as suggested by others.
Problem solved? Please give 'Kudos' and accept 'Answer as Solution'.