Search

I’ve finished reworking my personal site to use Symphony as its backend. Overall I’m very impressed—I haven’t done too much with Symphony yet, because my content requirements are modest at the moment, but I like what I have done so far.

As I put my site into production, however, I did notice one thing. The “user error” page Symphony generates is very informative—too informative for a production environment. How can I replace that with a nice but non-verbose fallback page? I’ve tried toggling display_errors off with a .htaccess directive, but that had no effect.

What version of Symphony are you using? If it’s Symphony 2.x, head over to /symphony/template/. That’s where all the error pages are generated. Make a backup of the files then tinker away :)

Thanks. I’m using Symphony 2.1.1. However, it looks like the error page I’m getting is generated inline in /symphony/core/class.errorhandler.php as the return value of GenericErrorHandler::render().

Is there something I can do that is a little friendlier, when it comes to applying updates, than just editing this file?

Unfortunately not for Symphony 2. Symphony 3 on the other hand has mechanism to allow for overriding of error pages without having to touch the core code; but Symphony 3 won’t be made final for a while yet.

Symphony 3 on the other hand has mechanism to allow for overriding of error pages without having to touch the core code

Sweet. I’ve been following the discussions. I’ll just have to hack it until then. Just wanted to make sure there wasn’t a smarter way. Thanks for the help.

Don’t these error pages get overwritten with Pages tagged as 403, 404 etc? Or is it more technical errors?

Technical errors. The pages in /symphony/core/class.errorhandler.php send a 500 header, so conceivably one could use a .htaccess directive to override that. (I don’t know if simply creating a page tagged with “500” would catch it.) I haven’t tried. The error page I got, which is the return value of GenericErrorHandler::render(), occurred because Symphony could not find an extension folder (this is what I get for developing on Windows and deploying on Linux).

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details