[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: lenny : locale problem



On Thursday 21 January 2010, Christophe MAINGUET wrote:
> i found a problem with the environment of apache2 :
> when starting by root with apache2ctl, the envirronment is from
>  root ( HOME & LANG ) when starting by init.d script then
>  environment is changed (HOME & LANG )
> 
> from a php page, i launch some svn commands, the result is that
>  www-data try to use personal information from root account
>  (HOME=/root) but there is no other problem (LANG=fr_FR.UTF-8) in
>  the other case, the svn command use the good personnal information
>  (HOME=. so : HOME=/var/www) but the LANG is C so files with
>  accents can not be updated !
> 
> It should be interresting to use the /default/locale in the init.d
>  script and use the HOME of www-data in apache2ctl in order that
>  the 2 starting modes have the same exection envirronment.

You can set LANG and HOME in /etc/apache2/envvars, which is read by 
both the init script and apache2ctl. Though maybe apache2ctl should 
really unset HOME if started as root.

Cheers,
Stefan


Reply to: