Laravel 5.2 Fatal error:vendor/composer/autoload_real.php on line 66

Viewed 28526

I have uploaded my laravel project from local to host. Now I have following error:

Fatal error: require(): Failed opening required '/home/httpd/vhosts/mort.com/httpdocs/cucc/testLaravel/vendor/composer/../../app/Libraries/helpers.php' (include_path='.:/usr/share/pear:/usr/share/php') in /home/httpd/vhosts/mort.com/httpdocs/cucc/testLaravel/vendor/composer/autoload_real.php on line 66`

I cannot understand what the problem is. The laravel framework is in the directory called testLaravel and the public content in a directory called laravel.

6 Answers

This error means some packages are missing, as I see you didn't run composer install, this means the required packages are not installed.

To solve it just go to the root of your project and run on the command line:

composer install

If the other solutions do not work, you can try:

1- Delete Composer Folder (vendor/composer)

2- Delete Autoload.php (vendor/autoload.php)

Then, write on the console:

3- Composer Install.

4- Composer Update.

5- And run server.

I hope this can help you.

Bye.

For me, only "composer install" doesn't' work. After googling I find out a solution which is given below

composer update --no-scripts 

and then

composer update

It's worked for me.

If you are using local composer path type packages and error is due to changing packages folder name then you must delete /vendor/package folder symlinks. Then run "composer update". This worked for me.

just delete

  1. vendor folder(delete)
  2. composer.lock(delete optional)

then run

composer install

First, delete the vendor folder from the project directory, then type the composer install command. Work fine me.

composer update composer install composer diagnose composer self-update

Related