mardi 11 mai 2021

autoload.php failed opening, vendor file not present in Apache

I've seen this question be asked before but I am having trouble finding one that fixes my problem - I am currently working with (and new to) Laravel Blade and Apache2. I have set up a project on our development server which is returning a 500 error on the staging website and the site-error.log shows the following error:

PHP Fatal error:  require(): Failed opening required '/var/www/WEBSITE-NAME/htdocs/public/../vendor/autoload.php' (include_path='.:/usr/share/php') in /var/www/WEBSITE-NAME/htdocs/public/index.php on line 34

Line 34 of index.php is:

require __DIR__.'/../vendor/autoload.php';

The path to the vendor folder is C:\laragon\www\WEBSITE-NAME\vendor which contains the autoload.php file.

I have tried composer install a few times with no change.

However the vendor folder isn't showing on the Apache2 server in the htdocs for the project. .gitignore was automatically updated with /vendor so I am not sure if this is the reason why it is not on the server, but other working projects have /vendor in their .gitignore and /vendor is present in their files on Apache.

Apologies if I haven't explained this well - any guidance would be appreciated, thanks so much!



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire