Doc #76956 [Ver->Csd]: Wrong value for setting 'syslog.filter' documented in php.ini
| From: | cmb@php.net | Date: | Mon, 18 Mar 2019 09:22:52 +0000 |
| Subject: | Doc #76956 [Ver->Csd]: 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-16490@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
+Status: Closed
Type: Documentation Problem
Package: Documentation problem
Operating System: Windows
PHP Version: 7.3.0RC2
Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of cmbecker69@gmx.de
Revision: http://git.php.net/?p=php-src.git;a=commit;h=ad2d2e41de3a8ac243a73ec447f4107f0ba56aac
Log: Fix #76956: Wrong value for 'syslog.filter' documented in php.ini
Previous Comments:
------------------------------------------------------------------------
[2018-10-01 14:07:28] cmb@php.net
> 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>
------------------------------------------------------------------------
[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