PhileCMS / Phile

A flat file CMS with a swappable parser and template engine.
https://philecms.github.io/
Other
257 stars 49 forks source link

[FEATURE] Disable PhileCMS Development Error Handler on production #121

Closed STOWouters closed 10 years ago

STOWouters commented 10 years ago

I really like the PhileCMS Development Error Handler. But I haven't found a way to disable it on production server. E.g. if there's an exception thrown, on production server it should redirect to exception.md instead of showing the full error handler, which is not really professional and may confuse the visitors.

I would request to add a $config['production'] = true option to config.php to enable/disable the error handler. What do you think, it's worth considering as a new feature?

NeoBlack commented 10 years ago

I am not sure if I understand your problem. On a LIVE system, you should use the default handler, which logs all error to the error log. Use the developer handler only on testing systems.

STOWouters commented 10 years ago

Use the developer handler only on testing systems.

That's exactly what I mean, when something went wrong on my production system, it displays the development handler instead of silently ignoring this (either by redirect) and write the errors to the error_log.

NeoBlack commented 10 years ago

but this is default behavior ;) You have set the developer handler in your config, remove this settings on LIVE and all is fine :)

STOWouters commented 10 years ago

Oh, I totally missed it! Thanks :smile:

NeoBlack commented 10 years ago

Your welcome ;)