How do I enable error reporting in Laravel?

自作多情 提交于 2021-02-08 15:02:07

问题


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

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

EDIT

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:\..............


回答1:


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

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

EDIT

according to the error in your apache2 log

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

you need to increase your memory limit

ini_set('memory_limit', XXX);



回答2:


ini_set('max_execution_time', 0);

set this at the start of your script, this will run your script forever and check your ipv4 address.



来源:https://stackoverflow.com/questions/42648990/how-do-i-enable-error-reporting-in-laravel

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!