1

I am new to Laravel. I have tried installing it on my local server but when run in borwser, I am getting this error.

Warning: require(D:\xampp\htdocs\laravel\bootstrap/../vendor/autoload.php): failed to open    stream: No such file or directory in D:\xampp\htdocs\laravel\bootstrap\autoload.php on line 17

 Fatal error: require(): Failed opening required'D:\xampp\htdocs\laravel\bootstrap/../vendor/autoload.php'   (include_path='.;D:\xampp\php\PEAR') 
 in D:\xampp\htdocs\laravel\bootstrap\autoload.php on line 17

Can anyone help me how to install it correctly on localhost ?

Thanks in advance for your help.

2
  • 1
    Do you install it with Composer ? Commented Dec 10, 2013 at 10:13
  • You can follow the following tutorial: youtube.com/watch?v=JNn_tS2KpcY Commented Dec 10, 2013 at 10:14

5 Answers 5

5

Try This on your wamp:

Installing Laravel 4 on WAMP

1. Enable OpenSSL

OpenSSL must be enabled in the PHP configuration.

Edit php.ini in your WAMP’s PHP folder, e.g.:

C:\wamp\bin\php\php5.4.12\

Note: This is not the php.ini in C:\wamp\bin\apache\Apache2.4.4\bin.

Find the following line and remove the semicolon save it:

;extension=php_openssl.dll changed to extension=php_openssl.dll

2. Install Composer

(i).Download the Composer Windows installer from getcomposer.org.

(ii). Run the installer.

(iii). When it asks for the location of php.exe, point it to the executable in your WAMP’s PHP folder, e.g.:

C:\wamp\bin\php\php5.4.12\

(iv). Finish the installation.

(v). Open a command-line interface (cmd) and type:

composer

It should return a list of options. If you get an error, restart your computer and try again.

Composer has now been installed and added to your PATH environment variable. This means you can run it from any directory using the command-line interface.

Now we need to install Composer. This is a dependency manager that will download the latest release of Laravel and specific versions of Laravel’s dependencies, such as Doctrine and Symfony.

3.Install Laravel

Now that Composer has been installed, Composer can download and install Laravel onto your system.

(i). Open a command-line interface (cmd).

(ii). Go to the directory in which you want to install Laravel. This is usually your development directory. In this tutorial, we’ll use C:\wamp\www\laravel

(iii). Instruct Composer to install Laravel into a project directory. we use project name myproject.

composer create-project laravel/laravel myproject --prefer-dist

Note: This will install Laravel in a subdirectory myproject of the current working directory.

Three type of installation to be completed Now your project was running directory like

C:\wamp\www\laravel\myproject\public\

After completed put tick mark and increase the point....

Sign up to request clarification or add additional context in comments.

Comments

2

Laravel uses Composer to manage it's dependencies.

You are seeing this error because PHP can't find the autoload.php file that Composer generates when you run the install command, most likely because you haven't installed Laravel's dependencies yet.

To do this you need to grab composer (instructions for *nix and Windows) and then run the following command from the root of your project:

composer install

Depending on how you install it, you may need to reference the .phar file directly, in which case run:

composer.phar install

The Laravel docs include this in their installation guide.

If you are new to Laravel you may find their quickstart guide handy which has a slightly different method of installing the framework using Composer's create-project functionality.

2 Comments

A mention to composer specifically would be useful in this answer as well as just a link to the Laravel quick start documentation.
I agree. But at the same time I didn't want to bombard him with links - as somebody who appears to be taking their first steps with Laravel/composer I felt it best to keep it simple!
1

From the looks of it you are downloading and installing Laravel correctly. This looks like a permission issue if you ask me.

Make sure your webserver has read privileges to the folder you are installing Laravel to and then follow the instructions posted above. In Ubuntu you can do this by:

sudo usermod -a -G www-data <your user name>
sudo chgrp -R www-data /var/www
sudo chmod -R g+w /var/www

After you have correct priveleges, you should run:

composer update

Comments

0

Step 1: Download and Install composer

http://getcomposer.org/

Step 2: Download and install git console

http://git-scm.com/downloads

Step 3: Install laravel (From git console) in your localhost folder

composer create-project laravel/laravel testlaravel 

Step 4: Buy a coffee and wait...

Step 5: Enjoy it!.

1 Comment

Hi User3505541 I have just tried your method but fails at "Removing symfony/finder(v2.4.3),Installing symfony/finder(v2.4.4),Downloading 100% and give an error of [ErrorException], ZipArchive::extractTo(): File exists" this has only started happening since I had to reinstall XP on my works machine I tried composer diagnose but it say every thing is OK any help greatly appreciated
0

I'd recomend you to use vagrant as laravel docs suggest: http://laravel.com/docs/homestead

It will create a virtual machine with every laravel dependance and also accessible from your host browser.

The hole configuration can be uploaded to your repository and will let you share with other developers without having to configure the whole environment every time.

As far as I can tell it's the best way to do it.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.