如何在Laravel中启用错误报告? [英] How do I enable error reporting in Laravel?

查看:67
本文介绍了如何在Laravel中启用错误报告?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Laravel 5.2,并且试图导入包含超过18000条记录的Excel工作表.出现以下错误.本地主机页面不起作用

I'm using Laravel 5.2 and I'm trying to import an excel sheet which contains more than 18000 records. the error below appeared. The localhost page isn’t working

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

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

I tried to change php.ini max_execution_time from 30 seconds to 300 seconds but nothing has been changed

编辑

apache错误日志文件显示:[:error] [pid 3680:tid 1724] [client :: 1:54491] PHP致命错误:E中的134217728字节已用尽允许内存大小(尝试分配24字节):\ ..............

the apache error log file says: [:error] [pid 3680:tid 1724] [client ::1:54491] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 24 bytes) in E:\..............

推荐答案

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

through your config/app.php set 'debug' => env('APP_DEBUG', false), to true

或者以一种更好的方式,检出您的 .env 文件,并确保将debug元素设置为true.

or in a better way , check out your .env file and make sure to set the debug element to true .

编辑

根据您的apache2日志中的错误

according to the error in your apache2 log

严重错误:耗尽的134217728字节允许的内存大小(尝试分配24个字节)

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

您需要增加内存限制

ini_set('memory_limit', XXX);

这篇关于如何在Laravel中启用错误报告?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆