0
votes

I need to display my own 404 page. I've tried to follow http://symfony.com/doc/current/cookbook/controller/error_pages.html I had to create the app/Resources/TwigBundle/views/Exception path as well as a error.html.twig and error404.html.twig. When I try to go to my localhost /404 page to see my personalized exception page, I get an UnexpectedValueException and on the live site/404, I get the symfony default exception page. Anyone know if I'm missing something? Do I need to change the Exception Listener?

1
Can you include the exception message that you're getting? - kunal
what is in your error404 page, have you tried a very simple content page? Have you changed your debug environment in your bootstrap file (new AppKernel('your name', false);)? - stefancarlton
UnexpectedValueException: The stream or file "/var/log/nginx/techproresearch-error_log" could not be opened: failed to open stream: Permission denied in /web/tech-pro-research/app/cache/dev/classes.php line 6471 at StreamHandler->write(array('message' => 'Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\NotFoundHttpException: "No route found for "GET /404"" at /web/tech-pro-research/app/cache/dev/classes.php line 3610', 'context' => array(), 'level' => '400', 'level_name' => 'ERROR', 'channel' => 'request', 'datetime' => object(DateTime) ... a bunch more in the exception - Becksters

1 Answers

0
votes

As @stefancarlton has mentioned check if your debug parameter is set to false. If it is set to true then all exceptions will display the full error page; in your case "No route found for "GET /404"". Secondly check the permission for your cache file.