Req #69561 [Asn->Opn]: FPM access.log strftime locale not configurable

From: Date: Tue, 24 Oct 2017 07:45:31 +0000
Subject: Req #69561 [Asn->Opn]: FPM access.log strftime locale not configurable
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-212156@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=69561&edit=1 ID: 69561 Updated by: kalle@php.net Reported by: mb at lunetics dot com Summary: FPM access.log strftime locale not configurable -Status: Assigned +Status: Open Type: Feature/Change Request Package: FPM related Operating System: FreeBSD 10.1 PHP Version: 5.6.8 -Assigned To: fat +Assigned To: Block user comment: N Private report: N Previous Comments: ------------------------------------------------------------------------ [2015-05-01 22:33:03] rasmus@php.net I tested this fix in the master branch: https://gist.github.com/anonymous/a9922882a355255dd032 And it seems to be working fine. @fat, any reason to not log after request shutdown here? ------------------------------------------------------------------------ [2015-05-01 22:27:08] rasmus@php.net This is because fpm logs before rshutdown is called for some reason. We reset the locale in rshutdown and other sapis will log after shutdown. eg. https://github.com/php/php-src/blob/php-5.6.8/sapi/fpm/fpm/fpm_main.c#L1987-L1992 It should be safe to change that order ------------------------------------------------------------------------ [2015-05-01 21:27:21] mb at lunetics dot com Okay, did some further testing. So somewhere hidden there's a setlocale(LC_ALL, 'de_DE.ISO8859-1', 'de_DE.ISO8859-15E'); call. So the current scripts Locale seems to affect the log output (which should be mostly English in my opinion) So it would be more a feature request having a custom locale for the fpm access.log strftime locale. ------------------------------------------------------------------------ [2015-05-01 21:06:49] mb at lunetics dot com Description: ------------ It seems the access.log / php-fpm directive "guesses" the locale from the timezone set? Systemtimezone is set to "Europe/Berlin" -> strftime %b -> "Mai" tried setting the timezone to "Europe/London" -> strftime %b -> "Mail" Would it be possible to set the locale for the access.log strftime parsing? ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=69561&edit=1

« previous php.bugs (#212156) next »