RE: [PHP4BETA] RE: [PHP4BETA] locale not working

From: Date: Sun, 14 Nov 1999 15:17:41 +0000
Subject: RE: [PHP4BETA] RE: [PHP4BETA] locale not working
Groups: php.version4 
Request: Send a blank email to php-version4+get-6215@lists.php.net to get a copy of this message
The problem isn't solved yet. When I use <? echo setlocale("LC_ALL","0"); ?> I receive as response LC_CTYPE=pt_BR;LC_NUMERIC=C;LC_TIME=C;LC_COLLATE=C;LC_MONETARY=C;LC_MESSAGES =C And since LC_TIME is not pt_BR, I can't get my dates formated with strftime(). If I look on bash defaults, LC_TIME is set to 'pt_BR' and LC_CTYPE is set to 'ISO-8859-1'. Giancarlo -----Mensagem Original----- De: Giancarlo Bonansea Para: 'php4beta@lists.php.net' Enviada: 14/11/99 13:10 Assunto: [PHP4BETA] RES: [PHP4BETA] locale not working I solved the problem setting /bin/bash for the nobody user, so it receives locale information when starting Apache. Is this the right way to do it? Is this a security breach? Giancarlo -----Mensagem Original----- De: Giancarlo Bonansea Para: 'php4beta@lists.php.net' Enviada: 14/11/99 12:09 Assunto: [PHP4BETA] locale not working Hi, Since I changed the locale information for my computer from "en_US" to "pt_BR", the phpinfo() does not return locale environment variables and if I use the setlocale("<envvar>","0"), all variables return "C". So I need to use the setlocale in every page. If I return my configuration to "en_US" then the variables reappear on the phpinfo() ans setlocale() results. All other settings and programs work perfectly with locale set to "pt_BR". Just PHP seems to work differently. Now I'm using the setlocale() into a auto_prepend_file to solve this issue. Thanks on some advice, Giancarlo

« previous php.version4 (#6215) next »