12
votes

Environement

  • Windows 7
  • WAMP server
    • PHP 5.3.13
    • Apache 2.2.12
    • MySQL 5.5.24
  • Laravel 4.1

I installed laravel, trying to run the URL

http://localhost/laravel/public 

autoload.php

define('LARAVEL_START', microtime(true));
require __DIR__.'/../vendor/autoload.php';

if (file_exists($compiled = __DIR__.'/compiled.php')){
    require $compiled;
}

Illuminate\Support\ClassLoader::register();

if (is_dir($workbench = __DIR__.'/../workbench')){
    Illuminate\Workbench\Starter::start($workbench);
}

I am facing the following errors:

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

and

Fatal error: require() [function.require]: Failed opening required 'C:\wamp\www\laravel\bootstrap/../vendor/autoload.php' (include_path='.;C:\php\pear') in C:\wamp\www\laravel\bootstrap\autoload.php on line 17

4
Your anchor's href is supposed to contain a file name =,= can you paste the code of autoload.php?AyB
i have pasted the code of autoload.php user007zogo

4 Answers

29
votes

Go to the current Project folder

C:\wamp\www\laravelProjectFolder>

and type composer install in command prompt and press ENTER key.

composer install

Then the vendor directory will be downloaded in the current project of laravel. Now refresh the screen.

2
votes

Simply make your storage folder writable. This can be found in your app directory

In your terminal use this command

chmod +w <directory> or chmod a+w <directory>

Make sure you navigate to the directory containing the directory you want to make writable or you point to that path.

0
votes

go to your project folder via cmd. run the following command

composer update

it will install missing vendor folder and files in your project.

but in some cases it gives error like " Your configuration does not allow connection to bla bla bla.."

for that go to your composer.json file,

change "secure-http": true to "secure-http": false

but in some cases (as was in my case) you may not find such line in your file. for that do the following action:

change "config": { "preferred-install": "dist" }

to

"config": {
    "preferred-install": "dist",
    "secure-http": false
}

and run again composer update command.

hope this will solve problem of many persons. :)

-1
votes

You are trying to include:

C:\wamp\www\laravel\bootstrap/../vendor/autoload.php

and the error gives

No such file or directory in 
         C:\wamp\www\laravel\bootstrap\autoload.php on line 17

so you need to check your directory layout. Is there a directory vendor in lavarel with a file autoload.php in it?

and you should either have / in your pathnames or \ but not mixed both.