Bug #71544 [NEW]: Broken syslog ident(tag) on php-fpm environment

From: Date: Sun, 07 Feb 2016 16:18:19 +0000
Subject: Bug #71544 [NEW]: Broken syslog ident(tag) on php-fpm environment
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-199095@lists.php.net to get a copy of this message
From: sunnyone41 at gmail dot com Operating system: Ubuntu 14.04 PHP version: 5.6.18 Package: *General Issues Bug Type: Bug Bug description:Broken syslog ident(tag) on php-fpm environment 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 -- Edit bug report at https://bugs.php.net/bug.php?id=71544&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=71544&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=71544&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=71544&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=71544&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=71544&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=71544&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=71544&r=needscript Try newer version: https://bugs.php.net/fix.php?id=71544&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=71544&r=support Expected behavior: https://bugs.php.net/fix.php?id=71544&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=71544&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=71544&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=71544&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=71544&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=71544&r=dst IIS Stability: https://bugs.php.net/fix.php?id=71544&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=71544&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=71544&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=71544&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=71544&r=mysqlcfg

« previous php.bugs (#199095) next »