Bug #75897 [NEW]: error_log() results in inappropriate/inconsistent Apache severity

From: Date: Wed, 31 Jan 2018 22:22:40 +0000
Subject: Bug #75897 [NEW]: error_log() results in inappropriate/inconsistent Apache severity
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-213770@lists.php.net to get a copy of this message
From: bjohnson at paylease dot com Operating system: any PHP version: 7.1.13 Package: Apache2 related Bug Type: Bug Bug description:error_log() results in inappropriate/inconsistent Apache severity Description: ------------ PHP 7.1 changed the behavior of PHP messages delivered to Apache2: specifically now PHP messages will have an Apache severity corresponding to the PHP severity. Previous to 7.1 the Apache severity was always 'warn'. This change brought with it two undesired side effects for calls to the built-in error_log() function when the error_log INI directive is un-set. 1. A simple call of error_log('some message') will have an Apache severity of 'notice', which may be lower than a user's Apache error LogLevel is set 2. When the error_log INI directive is unset, and using the Apache2 SAPI, the following three calls should be equivalent: error_log('message'); error_log('message', 0); error_log('message', 4); However the first two will result is a 'notice' level message, while the third will result in an 'error' level message. More discussion regarding the how/why of this behavior can be found in this pull request: https://github.com/php/php-src/pull/1981 Test script: --------------- <?php error_log('message'); error_log('message', 0); error_log('message', 4); Expected result: ---------------- The following three commands should have consistent behavior when the error_log INI directive is unset. If using the Apache2 SAPI, the message severity should be 'error' error_log('message'); error_log('message', 0); error_log('message', 4); Actual result: -------------- The first two commands will have a 'notice' severity. The third will have 'error'. -- Edit bug report at https://bugs.php.net/bug.php?id=75897&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=75897&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=75897&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=75897&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=75897&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=75897&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=75897&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=75897&r=needscript Try newer version: https://bugs.php.net/fix.php?id=75897&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=75897&r=support Expected behavior: https://bugs.php.net/fix.php?id=75897&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=75897&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=75897&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=75897&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=75897&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=75897&r=dst IIS Stability: https://bugs.php.net/fix.php?id=75897&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=75897&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=75897&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=75897&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=75897&r=mysqlcfg

« previous php.bugs (#213770) next »