如何在 Laravel 中启用错误报告?

How do I enable error reporting in Laravel?

我正在使用 Laravel 5.2 并尝试导入包含超过 18000 条记录的 excel sheet。出现以下错误。 本地主机页面不工作

localhost is currently unable to handle this request.
HTTP ERROR 500

我尝试将 php.ini max_execution_time 从 30 秒更改为 300 秒,但没有任何更改

编辑

apache 错误日志文件说:[:error] [pid 3680:tid 1724] [client ::1:54491] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried在 E:\.................

中分配 24 个字节)
ini_set('max_execution_time', 0);

在你的脚本开头设置它,这将 运行 你的脚本永远检查你的 ipv4 地址。

通过您的 config/app.php'debug' => env('APP_DEBUG', false), 设置为 true

或者以更好的方式,检查您的 .env 文件并确保将调试元素设置为 true。

编辑

根据您的 apache2 日志中的错误

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 24 bytes)

您需要增加内存限制

ini_set('memory_limit', XXX);

.env 文件中将 APP_DEBUG 更改为 true

APP_DEBUG=true