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: Closed Package: Documentation problem
PHP Version: 7.3.0RC2 OS: Windows
Private report: No CVE-ID: None
 [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

Pull Requests

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>
 [2019-03-18 09:22 UTC] cmb@php.net
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
 [2019-03-18 09:22 UTC] cmb@php.net
-Status: Verified +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Oct 06 01:01:27 2024 UTC