Error on Magento 2 after update from PHP 5 to PHP 7:
Warning: require(/var/www/html/vendor/magento/framework/registration.php): failed to open stream: No such file or directory in /var/www/html/vendor/composer/autoload_real.php on line 60
Fatal error: require(): Failed opening required '/var/www/html/vendor/magento/framework/registration.php' (include_path='/var/www/html/vendor/phpseclib/phpseclib/phpseclib:/var/www/html/vendor/magento/zendframework1/library:/var/www/html/vendor/phpunit/php-file-iterator:/var/www/html/vendor/phpunit/phpunit:/var/www/html/vendor/symfony/yaml:.:/usr/share/php') in /var/www/html/vendor/composer/autoload_real.php on line 60
Any help?
4 Answers 4
I am facing sem issue I have resolved this by below steps
- Remove below folders
rm -rf var/page_cache/* var/cache/* var/session/* var/di* var/view_preprocessed/* pub/static/* generated/code/
- Update composer
composer install
- Setup upgrade
php bin/magento setup:upgrade
- Content Deploy
php bin/magento setup:static-content:deploy -f
yes got it, we need to update composer.. i hope it will help some one
-
1I do not agree that this is not an answer to the question, it is, but it is a bit short... Could you elaborate more? What was the cause and why is this the right solution? What commands did you run?7ochem– 7ochem2017年12月19日 13:51:21 +00:00Commented Dec 19, 2017 at 13:51
-
i used rm -rf var/page_cache/* var/cache/* var/session/* var/di* var/view_preprocessed/* pub/static/* var/generation.Ganesh– Ganesh2017年12月20日 12:02:20 +00:00Commented Dec 20, 2017 at 12:02
-
But you said you had updated composer - now you are saying you deleted the cache folders? @Ganeshmjcoder– mjcoder2018年05月04日 15:59:29 +00:00Commented May 4, 2018 at 15:59
rm -rf var/page_cache/* var/cache/* var/session/* var/di* var/view_preprocessed/* pub/static/* var/generation
remove Module which you installed recently view composer composer remove [companyname]/[modulename]
Remember composer update will update all modules installed via composer
Setup upgrade php bin/magento setup:upgrade
Content Deploy php bin/magento setup:static-content:deploy -f it will work perfect
In my case I was just missing credentials for that package in my auth.json