[TYPO3-core] RFC #10228: Feature: displayErrors=2, but still display errors on CLI

Martin Kutschker masi-no at spam-typo3.org
Thu Jan 22 21:18:52 CET 2009


Ernesto Baschny [cron IT] schrieb:
> Dmitry Dulepov wrote: on 22.01.2009 17:00:
>> Hi!
>>
>> Ernesto Baschny [cron IT] wrote:
>>> Many sites set displayErrors=2 and have devIPmask to a list of IPs from
>>> the developer. This won't disturb the public, but the developer gets PHP
>>> errors, which is nice.
>>>
>>> Unfortunately this also disables PHP errors from being outputted when
>>> running CLI scripts (as there is no IP adress to check). This is
>>> particularly important if I set some cronjob running a CLI which can
>>> "break".
>>>
>>> So suggested is a new setting displayErrorsForceOnCLI (boolean) which
>>> will enable error output on CLI, even if displayErrors=2.
>> I would say "display errors in CLI if displayErrors==2". This is consistent with devIPMask because CLI runs on a localhost and localhost by default is in the devIPmask.
>>
>> It also has an advantage: support people will see problems immediately. They expect to see them in BE with displayErrors==2, so seeing them in CLI will be natural.
> 
> Nice, but I think there might be things that "break" if this is done by
> default. There might be tons of CLI scripts that were "silent" until
> now, and would start spitting out output (e.g. PHP-warnings) which were
> kept silent on purpose, with no way to turn it off again.
> 
> Maybe some setting like would be cool:
> 
> devIPmask=192.168.0.0/16,cli(ernst)
> 
> where "cli(ernst)" means a CLI script running as user "ernst".

Easier check for enviroment variable TYPO3_DEBUG. So you can
enable/disable debug mode at will when working from any CLI.

Masi


More information about the TYPO3-team-core mailing list