Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel error in exception handler

Tags:

php

laravel-4

I've installed laravel 4 and when I go to the following URL:

http://localhost/laravel/public/

I got this error:

Error in exception handler.

I've tried so far like said in this topic

Error in exception handler. - Laravel

but it couldn't help me. Any ideas?

like image 866
lalexa Avatar asked Jul 27 '14 15:07

lalexa


People also ask

What is error handling in Laravel?

Laravel makes it easy to display custom error pages for various HTTP status codes. For example, if you wish to customize the error page for 404 HTTP status codes, create a resources/views/errors/404.blade.php view template. This view will be rendered on all 404 errors generated by your application.

How do I change to 404 in Laravel?

Go to resources/views/errors and create a 404. blade. php file with what you want on your 404 page and Laravel takes care of the rest.

How do I disable error reporting in Laravel?

By default, error detail is enabled for your application. This means that when an error occurs you will be shown an error page with a detailed stack trace and error message. You may turn off error details by setting the debug option in your app/config/app. php file to false .

How do you do error reporting in Laravel?

Through your config/app. php , set 'debug' => env('APP_DEBUG', false), to true . Or in a better way, check out your . env file and make sure to set the debug element to true.


3 Answers

Laravel needs to write some files to app/storage folder so give app/storage write permissions chmod 777 some thing as suggested as below url or use chown www-data:www-data -R app/storage

Laravel error

like image 191
Arun Kumar Avatar answered Oct 16 '22 21:10

Arun Kumar


Were you using the FTP (FileZilla) ssh root@ipaddress and trying to connect the web server and does not see the var/www/html on list? you might thought it was just chmod -R 777(laravel's group folder)/app/storage, so I decided try by this sudo chmod -R 777 /var/www/html/(laravel's group folder)/app/storage. check the web server it went through the permission and it works.

like image 44
Ironheartbj18 Avatar answered Oct 16 '22 21:10

Ironheartbj18


@ArunKumar is right. But I generally use the artisan with sudo. This will give artisan all the permissions it needs and won't make any security problems as well.

so instead starting artisan serve with:

$ php artisan serve

try using:

$ sudo php artisan serve 

thus you wont have to make any permission changes.

like image 20
Skeletor Avatar answered Oct 16 '22 21:10

Skeletor