tags:

views:

2137

answers:

2

does symfony redirect to custom error page if Fatal PHP error occurs?

+2  A: 

No, you need to set that at the Apache level.

And make sure it's a flat HTML page - if PHP is causing the error and you try to deliver a PHP-driven 500 page, you might get the error again and Apache will figure out that your error page is recurring and display its own anyway.

Example from an .htaccess file

ErrorDocument 500 /errors/500.htm
Peter Bailey
A downvote? really?
Peter Bailey
+4  A: 

Yes, you can put the files to here

/www/site/web/errors/error500.php
/www/site/web/errors/unavailable.php

Read more 19-Mastering-Symfony-s-Configuration-Files