0

Disable module after run this command chown www-data -R /var/www/html

My env.php file empty.

php bin/magento c:f

Invalid configuration file: '/var/www/html/upgrademag/app/etc/env.php'

Fatal error: Uncaught Magento \ Framework \ Exception \ RuntimeException: Invalid configuration file: '/var/www/html/upgrademag/app/etc/env.php' in / var / www / html / upgrademag / vendor / magento / framework / App / DeploymentConfig / Reader.php: 118 Stack trace: # 0 /var/www/html/upgrademag/vendor/magento/framework/App/DeploymentConfig.php(140): Magento \ Framework \ App \ DeploymentConfig \ Reader-> load () # 1 /var/www/html/upgrademag/vendor/magento/framework/App/DeploymentConfig.php(70): Magento \ Framework \ App \ DeploymentConfig-> load () # 2 / var / www / html / upgrademag / vendor /magento/framework/App/ObjectManagerFactory.php(114): Magento \ Framework \ App \ DeploymentConfig-> get () # 3 /var/www/html/upgrademag/vendor/magento/framework/App/Bootstrap.php(210 ): Magento \ Framework \ App \ ObjectManagerFactory-> create (Array) # 4 / var / www / html / upgrademag / vendor / magento / framework / App / Bootstrap.php (125): Magento \ Framework \ App \ Bootstrap -> __ construct (Object (Magento \ Framework \ App \ ObjectManagerFactory), '/ var / www / html / u ...', array) # 5 / var / www / html / upgrade / index.php (36): Magento \ Frame in/var/www/html/upgrademag/vendor/magento/framework/App/DeploymentConfig/Reader.php on line 118

1 Answer 1

2

This error message is also shown if your app/etc/config.php is missing. If app/etc/env.php is present and you are still seeing this issue, check for app/etc/config.php. If it is not present, Magento can create it by running php bin/magento module:enable --all. This will recreate the file. Then, try running php bin/magento setup:upgrade again.

And More information this link :-

magento setup:upgrade error "deployment configuration is absent"

4
  • I have both env.php and config.php, but my env file is showing empty
    – DK Thakur
    Mar 13, 2020 at 6:23
  • you showing empty file because you disable the all module Mar 13, 2020 at 6:26
  • I disabled only one module prnt.sc/rfmzgv
    – DK Thakur
    Mar 13, 2020 at 6:30
  • you enable the module and run php bin/magento s:up Mar 13, 2020 at 6:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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