server - cpanel托管中的laravel服务器错误500

标签 server laravel-5.1

我在我的 cpanel 中托管 laravel 5.1,但它总是出错。我尝试了每种方法(htaccess、chmod 644 和 storage give o r+W),但它在我的 cpanel 中不起作用,但是当我从索引中删除以下行时。公共(public)文件夹的 php 它可以访问 index.php 文件:

$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);

$response = $kernel->handle(
    $request = Illuminate\Http\Request::capture()
);

$response->send();

$kernel->terminate($request, $response);

所以它可以访问我的文件夹。有谁能够帮助我?可能是由于 cpanel 的 php 版本造成的吗?

最佳答案

将此代码粘贴到您的 index.php 文件的顶部,该文件将位于公共(public)文件夹中:

ini_set('display_errors', '1');
ini_set('display_startup_errors', '1');
error_reporting(E_ALL);
然后访问你的项目的 URL,你会看到这个问题,因为哪个 laravel 抛出了这个错误。

关于server - cpanel托管中的laravel服务器错误500,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35618108/

相关文章:

database - Grammar.php 第 39 行中的 ErrorException : Array to string conversion

php - 未定义索引 : user in php

Symfony 不加载页面

java - JUnit 测试卡在 clientSocket.accept()?

c - 使用 C 中的简单 HTTP 服务器支持 gzip/zip 文件压缩

mysql - Laravel - 使用 `SQL_CALC_FOUND_ROWS` 与急切加载关系返回错误计数

php - laravel 5.1同时注册、更新用户信息和发送数据到两个表

Laravel "Homestead Up"更新 VirtualBox 后无法启动虚拟机,Vagrant 表示它已经存在

php - 如何强制浏览器缓存文本文件 (.ttf)

caching - Redis作为分布式网络中的缓存