I have installed Magento on a test Ubuntu 20.04.01 server via composer with the command:
composer create-project --repository=https://repo.magento.com/ magento/project-community-edition ~/magento --ignore-platform-reqs
After the installation, I created a symbolic link:
sudo ln -s /home/<loginname>/magento/vendor/magento/magento2-base /var/www/html/magento
When starting Magento, I receive an autoload error:
We can't read some files that are required to run the Magento application. This usually means file permissions are set incorrectly.
However, the file permissions have been set with the following command:
sudo find . -type f -exec chmod 644 {} \;
sudo find . -type f -exec chown www-data:www-data {} \;
sudo find . -type d -exec chmod 755 {} \;
sudo find . -type d -exec chown www-data:www-data {} \;
sudo find ./var -type d -exec chmod 777 {} \;
sudo find ./pub/media -type d -exec chmod 777 {} \;
sudo find ./pub/static -type d -exec chmod 777 {} \;
sudo chmod 777 ./app/etc
sudo chmod 644 ./app/etc/*.xml
On Magento 2 : getting Autoload error the user Sinisa Nedeljkovic wrote that it might be possible that the app/etc/vendor_path.php file is missing.
If you take a look at vendor/magento/magento2-base/app/autoload.php, you'll notice following piece of code:
define('VENDOR_PATH', BP . '/app/etc/vendor_path.php'); if (!file_exists(VENDOR_PATH)) { throw new \Exception( 'We can\'t read some files that are required to run the Magento application. ' . 'This usually means file permissions are set incorrectly.' ); }
That means that either you don't have app/etc/vendor_path.php file, or you're not having enough permissions.
And that is the case: that file is not present in the given folder.
So my question is: how do I get that file? Or copy it from ./vendor/magento/magento2-base/dev/tests/integration/testsuite/Magento/Framework/Composer/_files/vendor_path.php?
Feedback is appreciated and with kind regards, TheStingPilot