ZenphotoCMS Forum
Howto suppress "Display Errors" - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: General support (https://forum.zenphoto.org/forum-4.html)
+--- Thread: Howto suppress "Display Errors" (/thread-12999.html)



Howto suppress "Display Errors" - Nordlicht - 2018-01-21

In TYPO3 I have the option "how errors are handled" in the browser/frontend.

In the config file I would add following line:
$TYPO3_CONF_VARS['SYS']['displayErrors'] =
and the value: 'what I need';

Where can I adjust this with ZPC?




Howto suppress "Display Errors" - acrylian - 2018-01-21

Zenphoot generelly uses the server setting actually which IMHO should be off by default. Zenphoto enableds error reporting specifically if in debug mode.

You can do this via PHP or via htaccess.

For example:
http://php.net/manual/de/function.error-reporting.php
https://perishablepress.com/advanced-php-error-handling-via-htaccess/

I just looked and it disables it if the function date_default_timezone_set is avaialble. A bit weird actually I don't remember why this is that way (not my code). We probably should add an config setting or option (for admin rights users) for this.




Howto suppress "Display Errors" - Nordlicht - 2018-01-21

If I remember well, then I asked our hosting provider - already a veeery long time ago - to make this setting.
I was lazy and it is more convenient if you have a "shocking" news right infront of you, instead of tracking the error.log(s).

It would be nice if it would be possible to integrate such feature ($TYPO3_CONF_VARS['SYS']['displayErrors'] =) in ZPC as well




Howto suppress "Display Errors" - acrylian - 2018-01-21

On my host I can set this via their backend actually. And yes, it can be useful to have this errors right away while working on something.




Howto suppress "Display Errors" - Nordlicht - 2018-01-21

I am maybe old fashioned.
I like to chat with humans. I prefer it that way.
Maybe when my kids read this in the future, they will laugh.

I ask the hoster what the app needs and then we decide if and what action will be taken. The worst case(for the app) is, that we can't use this one but another.




Howto suppress "Display Errors" - acrylian - 2018-01-21

I would be sorry about that but ZP does not require that much specific acutally…




Howto suppress "Display Errors" - acrylian - 2018-01-23

The support build now always disables display_errors (or at least try to). If you really need it enabled you can set the constant TEST_RELEASE to true in zp-core/global-definitions.php.




Howto suppress "Display Errors" - Nordlicht - 2018-01-24

Thanks for taking action.

As you're already working on this matter would it be possible to extend it a little bit

$TYPO3_CONF_VARS['SYS']['displayErrors'] = 'what I need';
https://docs.typo3.org/typo3cms/SecurityGuide/GuidelinesIntegrators/GlobalTypo3Options/#displayerrors

and integrate something "more"
$TYPO3_CONF_VARS['SYS']['devIPmask'] = 'my ip';
https://docs.typo3.org/typo3cms/SecurityGuide/GuidelinesIntegrators/GlobalTypo3Options/#devipmask




Howto suppress "Display Errors" - acrylian - 2018-01-24

As said you can enable display errors via the constant if really needed. It should really be off generally, better use your php server error log instead (and there is also the ZP own debug log). It maybe be more accurat as well.

I probably won't extend this currently.