【发布时间】:2017-01-16 12:31:57
【问题描述】:
当我上传我的 Laravel 博客并尝试查看它时,我收到 500 错误(内部服务器错误)。
我对 laravel 很陌生,所以我还没有太多经验。但我已经尝试了一些东西。我读过 Laravel 的根目录需要在 /public 文件夹中。但是当我转到 {domain}/public 时,它并没有解决问题。
当然,我将数据库配置从本地更改为服务器的配置。
我使用的服务器是否可能不支持 Laravel,因为它不是默认的 PHP?或者有人知道更简单的解决方法吗?
我知道错误 500 可能由不同的问题引起。但是在本地主机上它工作正常。
这是我得到的错误日志:
[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}
谢谢!
【问题讨论】:
-
每当您获得 HTTP 500 时,您的第一步应该是查看您的日志。它们可能包含有效解决此问题所必需的更详细信息。
-
@Chris 感谢您的快速回答!我会看看它。当我(无法)找到解决方案时,我会在这里分享。
-
我想这个链接可以帮助你medium.com/laravel-news/…
-
您的文件是否有正确的权限?你的
storage/log/laravel.log文件说什么? -
我已经从主机切换,现在我得到一个错误日志:日志说类丢失:pastebin.com/ikXgrdCQ