问题描述
我正在尝试在Laravel 4测试版上创建一个应用程序,但我无法调试,因为它没有显示任何错误, display_errors
已打开, error_reporting
是 E_ALL
和 debug => true
( config / app.php
)。当我尝试在 public / index.php
上发生错误时,会显示一个解析错误,但是当我在路由器上这样做时,它只显示一个空白页(白屏死亡)。如何解决这个问题?
谢谢
> @Matanya - 你看过你的服务器日志,看看错误500实际上是什么?这可能是任何数量的事情
@Aladin - 白色屏幕死亡(WSOD)可以用Laravel 4以三种方式诊断。 / p>
选项1:转到您的Laravel日志(app / storage / logs),看看错误是否包含在那里。
选项2:转到您的PHP服务器日志,并查找导致WSOD的PHP错误
选项3:良好的旧调试技巧 - 在路由文件的起始处添加一个模块('hello')命令 - 然后继续移动到您的应用程序中,直到不再看到'你好'消息。使用此功能,您可以缩小引起您的WSOD的线路并解决问题。
I'm trying to create an app on Laravel 4 beta but I can't debug it because it doesn't show any error, display_errors
is on, error_reporting
is E_ALL
and debug => true
(config/app.php
). When I try to do an error on public/index.php
it shows a parse error, but when I do it on the router it just shows a blank page (White screen of death). How can I fix this?
Thank you
@Matanya - have you looked at your server logs to see WHAT the error 500 actually is? It could be any number of things
@Aladin - white screen of death (WSOD) can be diagnosed in three ways with Laravel 4.
Option 1: Go to your Laravel logs (app/storage/logs) and see if the error is contained in there.
Option 2: Go to you PHP server logs, and look for the PHP error that is causing the WSOD
Option 3: Good old debugging skills - add a die('hello') command at the start of your routes file - then keep moving it deeper and deeper into your application until you no longer see the 'hello' message. Using this you will be able to narrow down the line that is causing your WSOD and fix the problem.
这篇关于如何在laravel 4上显示错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!