5

I am ready to push a site to production (currently on staging), but I'm having a slight problem with the internal server error 500 page.

I have created a file in web/errors/error500.php and I've also got: ErrorDocument 500 errors/error500.php in my .htaccess file

The problem is, if there is a 500 error in the admin, it displays the symfony default 500 page instead of mine in the errors folder.

Does anyone have a rough idea why this is?

I've cleared symfony cache, cleared browser cache and used several browsers.

Thanks

terrid25
  • 1,926
  • 8
  • 46
  • 87
  • 1
    If it's any help, [this](http://symfony-check.org/permalink/customize-the-oops-an-error-occurred-page) is the advice I followed to get mine working, but it doesn't use .htaccess... – Matt Gibson Mar 30 '11 at 15:33
  • Yeah i looked at that and realised that the error needed to be in the config folder :) – terrid25 Mar 30 '11 at 16:34
  • Cool; in that case I'll post a proper answer that you can accept :) – Matt Gibson Mar 30 '11 at 16:54

2 Answers2

9

The standard Symfony way of doing this isn't with an Apache ErrorDocument directive, but simply by putting your error page in either <project>/apps/<appname>/config/error/error.html.php or <project>/config/error/error.html.php, for per-app or general error pages respectively. See this checklist item on the very handy Symfony Deployment Cheat Sheet.

Matt Gibson
  • 37,886
  • 9
  • 99
  • 128
1

Also make sure you are not in debug mode when you test this otherwise it will still show full stack trace.

Jbronson
  • 11
  • 1