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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: doussot at gifrance dot com
New email:
PHP Version: OS:

 

 [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)

Pull Requests

Pull requests:

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-2025 The PHP Group
All rights reserved.
Last updated: Fri May 09 21:01:27 2025 UTC