Starting error with laravel 4 : Whoops! There was an error - laravel

I was installing laravel 4 by following steps in the official website laravel.com
i downloaded the 4' version from github then i've running the command :
php composer.phar install
but when i try to start laravel by opening the path localhost/laravel/public
it show me this error
Can you help me?
thank you

Clear your cookies for 'localhost' and try again - this is likely picking up a session ID from a previous project. Even better would be to setup a Virtual Host so that you're not working from "localhost" but instead a domain like "mysite.dev".

Related

How to fix this error "Impossible to connect, please check your Algolia Application Id"?

I have everything correct, as written at laravel/algolia websites.
I tried to read lot of documentations and tutorials about Laravel Scout installation, but still can't find solution.
I have everything correct in my settings and also APIs are correct but still getting this error:
Impossible to connect, please check your Algolia Application Id.
I had the same issue (with Windows 10) and found this exception in the stack trace:
cURL error 60: SSL certificate problem: unable to get local issuer certificate (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)
I found the solution for the error above in another StackOverflow post:
1) Download the latest cacert.pem from
https://curl.haxx.se/ca/cacert.pem
2) Add the following line to php.ini (if this is shared hosting and
you don't have access to php.ini then you could add this to .user.ini
in public_html)
curl.cainfo="/path/to/downloaded/cacert.pem"
Make sure you enclose the path within double quotation marks!!!
It solved my problem, Laravel Scout is working fine after that. Hope this will help someone.
Apparently on the issue came from on wrong credentials, this can occurs providing the wrong Application ID or Admin API Key. Also the correct way to provide the credential on scout.php is :
'algolia' => [
'id' => env('ALGOLIA_APP_ID', ''),
'secret' => env('ALGOLIA_SECRET', '')
],
And then fill your credentials in your .env file.
I'd recommend you to run php artisan config:clear in case you have cached your configuration (which you shouldn't do in dev env).
Let us know if it solve your issue.
I had the same issue and solved it like this
php artisan cache:clear
php artisan route:clear
php artisan config:clear or config:cache
My assumption is, because Laravel always creates a cache in the config, every time we change some config, there must be another config that is broken or an error due to the cache that was created earlier.
But I don't know for sure.
I share with you my experience.
System was Vagrant Homestead with VirtualBox in Windows 10.
command used in CMD:
php artisan scout:import "App\Post"
command failed with:
Impossible to connect, please check your Algolia Application Id.
Logged into virtual box with vagrant ssh and gave it another try.
That solved my problem.

How to Host laravel 5.2 on CENTOS server

I am trying to host my laravel 5.2 project on a CENTOS Server (Shared Hosting) I followed this tutorial
https://medium.com/laravel-news/the-simple-guide-to-deploy-laravel-5-application-on-shared-hosting-1a8d0aee923e
but when I try running it on online I get a blank page.
I checked my log I got this error
AH01276: Cannot serve directory /var/www/html: No matching DirectoryIndex (index.html,index.php,index.php) found, and server-generated directory index forbidden by Options directive
I then followed this http://www.liquidweb.com/kb/apache-error-no-matching-directoryindex-index-html-found-solved/ to solve that but I still keep getting a blank page with the same error in the log.
Please any help will be so much appreciated.
Thanks in advance.
You should point web server to a public directory inside Laravel project directory, not to it's root.
I had to redirect apache in the host file to the project folder

Laravel errors gone

enter code hereHi all my on windows 7(so i don't have any folder permissions) I have can't see Laravel error anymore. It worked fine yesterday.
why? what's wrong?
Laravel version 5.1 and web server wamp lastest version.
I found this link
but can't find file - storage/meta/compiled.php
this command also not working for me - php artisan optimize
also debug = true in .env and app.php files
please help
If you read the installation documentation you will find the following information:
After installing Laravel, you may need to configure some permissions. Directories within the storage and the bootstrap/cache directories should be writable by your web server. If you are using the Homestead virtual machine, these permissions should already be set.

Upload a Laravel 4.2 project on bytehost

I have uploaded my Laravel 4.2 project (using Filezilla) which is stored in folder name main-Laravel into the htdocs folder on bytehost.when I tried accessing it like this http://bcms.byethost8.com/main-laravel/public/, I an error saying Fatal error: require(): Failed opening required '/home/vol12_4/byethost8.com/b8_16140412/htdocs/main-laravel/bootstrap/../../main-laravel/vendor/autoload.php' (include_path='.:/usr/share/pear/') in /home/vol12_4/byethost8.com/b8_16140412/htdocs/main-laravel/bootstrap/autoload.php on line 17. I did not have this problem when working on my local machine, so what can I do to resolve this problem and thanks in advance.
You will need to do additional setup to get Laravel working on a shared hosting.
Laravel needs composer to get the autoloading right and few other requirements to be run (such as higher PHP version, several PHP extensions & so on).
Here you can find more info:
http://laravel-tricks.com/tricks/setup-laravel-4-in-shared-hosting-with-securing-laravel-base-file

Lumen not working out of the box

Just installed Lumen framework.
hit the link http://localhost/lumen/public/ in my browser and got this following error, anyone got any idea about it?
Traced it back to the app.php file in bootstrap folder.
if You want to access lumen project without "php artisan serve"
$app->run(); replace with
$request = Illuminate\Http\Request::capture();
$app->run($request);
from this path yourlumenproject/public/index.php
Open your terminal in the root folder run the following command php artisan serve.
Lumen development server started on http://localhost:8000/
if you want to serve your app in local development you can do this :
php -S localhost:8000 -t public/
and it will serve in localhost in port 8000. hope this help.
Note : I'm using Laravel Framework version Lumen (5.2.4) (Laravel Components 5.2.*)
At the moment Lumen only runs in the domain root.
(I've submitted a PR that fixes this but it has yet to be merged)
You have to create a Virtual Host on your local webserver and point the document root of that to the public directory. After that you can access your app with something like: http://lumen.dev.
Guide for Virtual Hosts with nginx
Guide for Virtual Hosts with Apache
A simple alternative to setting this up manually is Laravel Homestead. It is an official Vagrant box made for Laravel, that allows you to easily get your development environment up and running.

Resources