Description:
------------
When error_log = syslog is set at php.ini on php-fpm environment, broken ident (tag) is used like this:
Feb 7 22:02:36 phphost ool www: ERRORTEST
^^^^^^^
This is caused by changing argv[0] by php-fpm. syslog() calls internally openlog() and it uses __progname as the default ident value, but the pointer __progname indicates the place of basename in old argv[0].
v after the last slash
/usr/sbin/php5-fpm <- original argv[0]
php5-fpm <- expected __progname
php-fpm: pool www <- customized argv[0]
ool www <- actual __progname
I think "ool www" is not expected for most people. openlog() with proper ident (syslog.ident in php-fpm.conf?) argument should be called with php-fpm environment.
Test script:
---------------
<?php error_log("ERRORTEST") ?>
Expected result:
----------------
A line like below will be written:
Feb 7 22:02:36 phphost php-fpm: ERRORTEST
Actual result:
--------------
A line like below will be written:
Feb 7 22:02:36 phphost ool www: ERRORTEST