Doc #76956 [Ver]: Wrong value for setting 'syslog.filter' documented in php.ini
| From: | a dot schilder at gmx dot de | Date: | Mon, 01 Oct 2018 14:07:24 +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-16033@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
User updated by: a dot schilder at gmx dot de
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
Block user comment: N
Private report: N
New Comment:
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)?!
Previous Comments:
------------------------------------------------------------------------
[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