Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failure to find autoload.php

I'm stuck on a very basic problem:

I'm trying to use Laravel, which I installed on my windows 7 with composer. When I try to access my website locally with Wamp, I get the error:

Warning: require(C:\wamp\www\sitedirectory\public\protected\bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in C:\wamp\www\sitedirectory\public\protected\bootstrap\autoload.php on line 17

Everywhere I can read that all I have to do is run composer install or update. The problem is that I did run both and nothing has to be updated. The files are where they are needed so I dont understand what could be the problem.

Does anyone have an idea of what could be my problem? Thank you in advance.

like image 592
Pierre P. Avatar asked Jul 01 '15 08:07

Pierre P.


1 Answers

Composer is a tool for managing and installing dependencies.

There should exist a file named composer.phar in the directory C:\wamp\www\sitedirectory\public\protected\. There you should execute the command composer.phar install (on the command line).

Then, the directory vendor containing the autoload.php etc. should be generated.

If the composer.phar does not exist (but at least a file named composer.json), follow the steps explained here to download composer.

like image 143
dhh Avatar answered Oct 21 '22 17:10

dhh