News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

ServerGrove Blog:
How to customize the error pages in Symfony2
October 28, 2010 @ 13:25:34

On the ServerGrove blog there's a new post showing you how to customize those default error pages that show up in a Symfony2 application when an exception is thrown.

The framework produces a very detailed report when in the development environment. However, when you put the application in the production server, you will need to display a user friendly page. Creating a custom page is actually simple. All you need to do is define a controller/action pair that will generate the response. You can either use an existing controller or create one specifically to handle errors.

They include a sample "lean" controller to just handle the output for the exceptions as well as a template to go with it that just has a basic customized message and a status code for the exception. Using it is simple - just add an "exception_listener" setting to your configuration file to point at the new controller.

0 comments voice your opinion now!
customize tutorial error output symfony2


blog comments powered by Disqus

Similar Posts

ZendCasts.com: Creating RSS & Atom Feeds with Zend_Feed

Sanisoft Blog: Theming your CakePHP apps (V1.2)

DevShed: Working with Regular Expressions with Filters in PHP 5

Mark Kimsal's Blog: Is Your MVC MIA When it Comes to 404s?

Cal Evans' Blog: How I got Zend_Tool working on Windows


Community Events





Don't see your event here?
Let us know!


framework zendserver release introduction update community laravel series tips interview symfony package podcast deployment unittest language opinion api install library

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework