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

Ernesto Baschny [cron IT] ernst at cron-it.de
Thu Jan 22 18:28:14 CET 2009


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".

This would give a way to have CLI scripts that give no PHP-warnings in
"production mode" (as another user), and still output PHP-errors and
also debug(), etc when run as user "ernst" (of course debug() will have
adapted to output plain-text instead of HTML when in CLI-mode).

Cheers,
Ernesto


More information about the TYPO3-team-core mailing list