Reputation: 285
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.
Upvotes: 1
Views: 4321
Reputation: 1
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.
Upvotes: 0
Reputation: 2614
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....
Upvotes: 5
Reputation: 774
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
Upvotes: 1
Reputation: 25
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!.
Upvotes: 0
Reputation: 373
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.
Upvotes: 2