Bug #74469 [NEW]: syslog.ident setting ignored when logging errors (error_log=syslog)

From: Date: Tue, 18 Apr 2017 16:42:46 +0000
Subject: Bug #74469 [NEW]: syslog.ident setting ignored when logging errors (error_log=syslog)
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-208639@lists.php.net to get a copy of this message
From:             vedad at kajtaz dot net
Operating system: FreeBSD 10.3
PHP version:      7.1.4
Package:          FPM related
Bug Type:         Bug
Bug description:syslog.ident setting ignored when logging errors (error_log=syslog)

Description:
------------
The FPM setting 'syslog.ident' is ignored when PHP errors (eg. syntax
errors) are being logged to syslog (error_log = syslog).

Instead of the specified syslog.ident, "php-fpm" is always being sent
to syslog, while the explicit syslog() calls (not preceeded by an
explicit openlog()) from scripts correctly use the configured
syslog.ident.

Occurs both on latest 7.0 and 7.1 releases.

Test script:
---------------
Set the following FPM setting:

error_log = syslog
syslog.ident = foobar

Start/reload FPM, invoke a script containing a syntax error.

Expected result:
----------------
2017-04-18T18:29:00.080031+02:00 ps foobar[XXX]: PHP Parse error: 
syntax error, unexpected 'return' (T_RETURN) in ... on line ...


Actual result:
--------------
2017-04-18T18:29:00.080031+02:00 ps php-fpm[XXX]: PHP Parse error: 
syntax error, unexpected 'return' (T_RETURN) in ... on line ...


-- 
Edit bug report at https://bugs.php.net/bug.php?id=74469&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=74469&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=74469&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=74469&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=74469&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=74469&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=74469&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=74469&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=74469&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=74469&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=74469&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=74469&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=74469&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=74469&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=74469&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=74469&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=74469&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=74469&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=74469&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=74469&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=74469&r=mysqlcfg



Thread (3 messages)

« previous php.bugs (#208639) next »