|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #69561 FPM access.log strftime locale not configurable
Submitted: 2015-05-01 21:06 UTC Modified: 2017-10-24 07:45 UTC
Avg. Score:4.5 ± 0.5
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: mb at lunetics dot com Assigned:
Status: Open Package: FPM related
PHP Version: 5.6.8 OS: FreeBSD 10.1
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2015-05-01 21:06 UTC] mb at lunetics dot com
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?


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2015-05-01 21:26 UTC]
-Assigned To: +Assigned To: fat
 [2015-05-01 21:27 UTC] 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 22:27 UTC]
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.


It should be safe to change that order
 [2015-05-01 22:33 UTC]
I tested this fix in the master branch:

And it seems to be working fine. @fat, any reason to not log after request shutdown here?
 [2017-10-24 07:45 UTC]
-Status: Assigned +Status: Open -Assigned To: fat +Assigned To:
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jun 15 11:01:30 2024 UTC