如何调试 Symfony 2 中的 500 错误 [英] How to debug 500 Error in Symfony 2

查看:14
本文介绍了如何调试 Symfony 2 中的 500 错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为 Symfony 2 错误报告而苦苦挣扎,因为我无法找出触发 500 错误时真正发生了什么.

I am struggling with Symfony 2 error reporting because I can't find out what really is happing when a 500 Error is triggered.

我已经正确安装了 XDebug,但似乎 Symfony 统治了一切.

I have XDebug correctly installed, but it seems like Symfony rules everything.

自定义页面只是说:

Oops! An Error Occurred

The server returned a "500 Internal Server Error".

Something is broken. Please e-mail us at [email] and let us know what you were doing when this error occurred. We will fix it as soon as possible. Sorry for any inconvenience caused.

这太有趣了!有些东西坏了,但事实是我需要修复我的代码,但不知道问题出在哪里或出在哪里!当然,如果我给 Symfony 团队发送一封电子邮件,一旦我什至不知道该说什么,他们是否能够解决我的问题?

That's pretty much funny! Something is broken, but, the fact is that I need to fix my code, but can't know what or where it is the problem! And sure, If I send an email for the Symfony team will they be able to solve my problem once I not even know what to say them?

关于我在这里缺少什么的一些线索?

Some clue on what I am missing here?

推荐答案

首先,根据你的环境查看app/logs中的日志——dev.log开发,prod.log 用于生产等

First, look at the logs in app/logs depending on your environment — dev.log for development, prod.log for production, etc.

如果代码在 Symfony 有机会运行之前崩溃,请检查您的网络服务器的日志——例如nginx.

If the code crashes before Symfony has a chance to run, check the logs of your web server — e.g. nginx.

这篇关于如何调试 Symfony 2 中的 500 错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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