3

when I install a new theme I do this commands via Putty:

php bin/magento setup:upgrade 

how can I fix this problem? I'm working on Magento 2.1.0

PHP Warning: Uncaught Exception: Warning: require(/var/www/vhosts/a.com/httpdocs/setup/config/application.config.php): failed to open stream: No such file or directory in /var/www/vhosts/a.com/httpdocs/vendor/magento/framework/Console/Cli.php on line 57 in /var/www/vhosts/a.com/httpdocs/vendor/magento/framework/App/ErrorHandler.php:61

1
  • Please check,it may cause of permission. Nov 16, 2017 at 2:40

5 Answers 5

3

Your site miss the file /var/www/vhosts/a.com/httpdocs/setup/config/application.config.php, you could copy it from original official install files.

Also a possibility, the file application.config.php or the directory /var/www/vhosts/a.com/httpdocs/setup/config/ lack permission, try to give it read and write permission.

3
  • setup folder not in httpdocs
    – Amd2030
    Nov 16, 2017 at 17:54
  • 1
    @Amd2030 Setup folder not in httpdocs indicates that your installation is not complete, please download again from official page magento.com/tech-resources/download
    – Key Shang
    Nov 17, 2017 at 1:28
  • had this happen when cloning a site - setup didn't copy for some reason. Upload the setup folder into the base - php bin/magento setup:upgrade > php bin/magento setup:di:compile > php bin/magento setup:static-content:deploy -s standard = problem fixed for me. Thanks.
    – dawhoo
    Sep 24, 2018 at 16:19
1

I just ran into this same issue; it happened to me because a composer update failed in the middle of its process and did not clean up correctly, leading to a corrupted vendor asset.

The easiest way to fix this is to remove your vendor/ folder and reinstall vendor assets from composer.lock:

  1. rm -rf vendor/
  2. composer install

After running the above, bin/magento set:up should work as expected.

0

first: setup folder not there so, i install a new and clear installation 
second: my hosting use Plesk so all command should be with the path of php
the replacment code of

php bin/magento setup:upgrade 

is

/opt/plesk/php/5.6/bin/php bin/magento setup:upgrade 

0

I've also face this issue when setup:upgrade, if you not install magento properly then some files missing in root directories, so best option is download files from magento official side related your magento version.

And regarding your issue add setup/config/application.config.php after check "app/" in all files and "etc/" in all files with magento default. then

rm -rf var/page_cache/ var/cache/ pub/static/frontend/ generated/ && php bin/magento setup:upgrade  && php bin/magento setup:di:compile
-2

Deleting manually

  • var/generation
  • var/cache
  • var/view_preprocessed
  • var/page_cache
  • var/di

solved it for me.

or by using ssh you can run below commands

rm -rf var/cache/* var/generation/* var/view_preprocessed/* var/page_cache/* var/di/*

Hope this will help.

4
  • after run previous commands: # var/generation/* -bash: var/generation/Composer: Is a directory # var/view_preprocessed/* -bash: var/view_preprocessed/css: Is a directory # var/page_cache/* -bash: var/page_cache/mage--0: Is a directory # var/di/* -bash: var/di/adminhtml.ser: Permission denied
    – Amd2030
    Nov 16, 2017 at 18:09
  • Hi, I have updated a script.
    – Meetanshi
    Nov 17, 2017 at 3:45
  • still not working
    – Amd2030
    Nov 17, 2017 at 21:16
  • this doesn't work
    – dchayka
    Jul 18, 2018 at 21:44

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.