www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@arctic.org>
Subject Re: mod_log-any/679: mod_log_config logs wrong month names in german/english
Date Sun, 29 Jun 1997 10:50:01 GMT
The following reply was made to PR mod_log-any/679; it has been noted by GNATS.

From: Dean Gaudet <dgaudet@arctic.org>
To: Andreas Jung <ajung@sz-sb.de>
Subject: Re: mod_log-any/679: mod_log_config logs wrong month names in german/english
Date: Sun, 29 Jun 1997 03:49:03 -0700 (PDT)

 
 I just looked at php-2.0b12 source code and it issues
 
 setlocale(LC_ALL,""); 
 
 At the beginning of a request.  This changes the locale from the default
 "C" to "de", since you indicated that your LANG variable is set to "de". 
 So any httpd children which run a php request will end up in the de locale
 and this will affect logging. 
 
 Apache uses the strftime() function to print dates, and that is influenced
 by setlocale().  I can't think of anything that is portable that would do
 what you want. 
 
 You should be able to avoid your logging inconsistency by removing LANG=de
 from your environment.  Should you want it for CGIs you can always use the
 mod_env module to add it. 
 
 If you want to hack apache to do something specific for you then you could
 add setlocale(LC_ALL,"C") into the top of multi_log_transaction in
 mod_log_config.
 
 Unless someone else has a suggestion ...
 
 Dean
 
 On Sun, 29 Jun 1997, Andreas Jung wrote:
 
 > On Sat, 28 Jun 1997 dgaudet@hyperreal.com wrote:
 > 
 > > Synopsis: mod_log_config logs wrong month names in german/english
 > > 
 > > State-Changed-From-To: open-analyzed
 > > State-Changed-By: dgaudet
 > > State-Changed-When: Sat Jun 28 15:57:28 PDT 1997
 > > State-Changed-Why:
 > > I'm suspecting some module or maybe something involving mod_include
 > > is playing with the locale environment variables.  So that a
 > > child starts off running correctly, but then something mucks
 > > with the settings and it stops running correctly.
 > 
 > Aside from the standard distribution, I'am only using PHP additionally.
 > mod_include is compiled in however I don't use it at this time.
 > 
 >  
 > > Do you always start apache with the same environment variables?
 > > (i.e. wrap it in an "env - FOOBAR=blah httpd -d /path/to/serverrot"
 > > sort of script)
 > 
 > Apache is always started at boot time from a dedicated www account.
 > However this account has no locale enviroment variables set.
 > 
 > > Do any of your server side includes play with the locale settings?
 > > 
 > 
 > No ! :-)
 > 
 > I think the logging modules should be fixed the way that it logs the time
 > independentl of the locale settings.
 > 
 > Best regards,
 > Andreas
 > 
 >     ------------------------------------------------------------------------
 >    - Andreas Jung, Bruchwiesenanlage 2,D-66125 Saarbrücken, Germany       -
 >   - Phone: +49-(0)6897/972207, EMail: ajung@sz-sb.de (PGP key available) - 
 >  - URL: http://home.pages.de/~ajung, IRC: YET@#saar                     - 
 >   - Member of the Python Software Activity (PSA), Contributor of the     -
 >    - Python Starship Project: http://starship.skyport.net                 -
 >     ------------------------------------------------------------------------
 > 
 > 
 

Mime
View raw message