Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error 500 when uploading Laravel project to server

Tags:

linux

php

laravel

When I upload my Laravel Blog and try to view it I get a 500 error (Internal server error).

I'm very new to laravel so I don't have much experience yet. But I've already tried some things. I've read that the root directory from Laravel needs to be in the /public folder. But when I go to {domain}/public it doesn't solve the problem.

Of course I changed the Database configuration from local to the configuration of the server.

Is it possible that the server I use doesn't support Laravel since it isn't the default PHP? Or does somebody know an easier fix?

I know that Error 500 can be caused by different problems. But on localhost it works fine.

This is the error log I get:

[2016-09-09 22:41:38] local.ERROR: exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Class 'Illuminate\Notifications\NotificationServiceProvider' not found' in /home/nieckki171/domains/nieckki171.171.axc.nl/public_html/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php:146
Stack trace:
#0 {main}  
[2016-09-09 22:41:39] local.ERROR: exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Class 'Illuminate\Notifications\NotificationServiceProvider' not found' in /home/nieckki171/domains/nieckki171.171.axc.nl/public_html/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php:146
Stack trace:
#0 {main}  
[2016-09-09 22:41:47] local.ERROR: exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Class 'Illuminate\Notifications\NotificationServiceProvider' not found' in /home/nieckki171/domains/nieckki171.171.axc.nl/public_html/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php:146
Stack trace:
#0 {main}  

Thanks!

like image 786
Nieck Avatar asked Sep 08 '16 14:09

Nieck


2 Answers

Make sure you have composer in your server.If not, please use

$ curl -sS https://getcomposer.org/installer | php — –filename=composer

Then

$ php composer install
$ php composer dumpautoload -o
$ php artisan config:cache
$ php artisan route:cache

For more details, use this site, which was suggested by @mfadel

like image 163
Sachith Muhandiram Avatar answered Oct 03 '22 04:10

Sachith Muhandiram


Make sure you run a composer install on the server.

like image 37
Smokinggunz Avatar answered Oct 03 '22 03:10

Smokinggunz