Solving error 500 in Symfony2

Posted by alexmoreno on Fri, 24/08/2012 - 12:51

Having the typical error 500 in Symfony2? Well, it is very tipical, not just in Symfony but in Drupal and other web frameworks and CMS. Solving it can be a big headache... if you don't know where to see.

In Drupal it is easy to solve it using show all errors in php (on index.php of Drupal, for example). In Symfony2 you can use this tip:

Go to the root of your app. Then execute a clean cache:

{syntaxhighlighter brush: as3;fontsize: 100; first-line: 1; }php app/console cache:clear{/syntaxhighlighter}What we achieve with that is being able to see error messages on console, after you execute this command. Messages that you will not allways see en error.logs of apache or ngnix.