php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #76956 Wrong value for setting 'syslog.filter' documented in php.ini
Submitted: 2018-10-01 11:35 UTC Modified: 2018-10-01 14:07 UTC
From: a dot schilder at gmx dot de Assigned: cmb (profile)
Status: Verified Package: Documentation problem
PHP Version: 7.3.0RC2 OS: Windows
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: a dot schilder at gmx dot de
New email:
PHP Version: OS:

 

 [2018-10-01 11:35 UTC] 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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-10-01 13:59 UTC] cmb@php.net
-Status: Open +Status: Verified -Assigned To: +Assigned To: cmb
 [2018-10-01 13:59 UTC] 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 14:02 UTC] cmb@php.net
-Assigned To: cmb +Assigned To:
 [2018-10-01 14:02 UTC] cmb@php.net
Hmm, just noticed that “no-ctrl” sets PHP_SYSLOG_FILTER_NO_CTRL,
but this constant is never used.
 [2018-10-01 14:07 UTC] 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:07 UTC] cmb@php.net
-Assigned To: +Assigned To: cmb
 [2018-10-01 14:07 UTC] 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>
 
PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Fri Nov 16 11:01:25 2018 UTC