php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #404 SetLocale() changes Apache log format
Submitted: 1998-05-26 12:35 UTC Modified: 1998-05-26 15:54 UTC
From: doussot at gifrance dot com Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 3.0 Latest CVS OS: Linux 2.0.33/Libc6
Private report: No CVE-ID: None
 [1998-05-26 12:35 UTC] doussot at gifrance dot com
If you call setlocale() in a Php script, Apache logs
will be written with this new locale.

Example:
SetLocale("LC_TIME", "fr_FR.ISO-8859-1");

angel.gi.fr - - [26/mai/1998:18:25:15 +0200] 

This is a serious problem for most log analysis programs

Patches

asdf (last revision 2014-11-07 12:35 UTC by asdf at gmail dot com)

Add a Patch

Pull Requests

Pull requests:

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-05-26 15:54 UTC] zeev
So don't use setlocale()...  There's really nothing
much that can be done about this.
We may change PHP to automatically set the original locale
back at the end of script execution, but that's *a lot*
of overhead.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 21:01:31 2024 UTC