Doc #76956 [Ver]: Wrong value for setting 'syslog.filter' documented in php.ini

From: Date: Mon, 01 Oct 2018 14:07:28 +0000
Subject: Doc #76956 [Ver]: Wrong value for setting 'syslog.filter' documented in php.ini
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-16034@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=76956&edit=1 ID: 76956 Updated by: cmb@php.net Reported by: a dot schilder at gmx dot de Summary: Wrong value for setting 'syslog.filter' documented in php.ini Status: Verified Type: Documentation Problem Package: Documentation problem Operating System: Windows PHP Version: 7.3.0RC2 -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: > Hmm, just noticed that “no-ctrl” sets PHP_SYSLOG_FILTER_NO_CTRL, > but this constant is never used. Well, that's fine[1]. [1] <https://github.com/php/php-src/blob/php-7.3.0RC2/main/php_syslog.c#L95> Previous Comments: ------------------------------------------------------------------------ [2018-10-01 14:07:24] a dot schilder at gmx dot de Perhaps this explains why all characters seemed to be logged without filtering in Windows event log, although the default was set (tested it by simply logging each ASCII character)?! ------------------------------------------------------------------------ [2018-10-01 14:02:39] cmb@php.net Hmm, just noticed that “no-ctrl” sets PHP_SYSLOG_FILTER_NO_CTRL, but this constant is never used. ------------------------------------------------------------------------ [2018-10-01 13:59:24] cmb@php.net Thanks for reporting this issue! Indeed, it should be “no-ctrl” instead of “no_ctrl”[1], and “ascii” passes all printable ASCII characters plus NL. Regardless of the setting, all “unallowed” characters are written in their hexadecimal representation prefixed with “\x”[2]. [1] <https://github.com/php/php-src/blob/php-7.3.0RC2/main/main.c#L341> [2] <https://github.com/php/php-src/blob/php-7.3.0RC2/main/php_syslog.c#L87-L104> ------------------------------------------------------------------------ [2018-10-01 11:35:06] a dot schilder at gmx dot de Description: ------------ The documentation in the php.ini mentions three values for 'syslog.filter': - ascii - no_ctrl - all ...but the currently returned default value is 'no-ctrl' (with minus, not with underscore), so the documentation doesn't match the implementation. Also the documentation of 'ascii' is unclear here: What are the "base ASCII characters"? Chracters that are not defined as control character? Test script: --------------- n/a Expected result: ---------------- no-ctrl Actual result: -------------- no_ctrl ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=76956&edit=1

« previous php.doc.bugs (#16034) next »