Bug (approved)

WARNING: Could not set locale to 'de_DE.UTF8,de_DE@euro,de_DE,de,gede.utf8,deu,german'

Summary

approved
Jan 21, 2009
100%
Dec 3, 2009
Jan 21, 2009 / guest
Dec 3, 2009 / pixtur
 

Attached files

No files uploaded
 
.. after upgrading from 0.0803 to 0.0901 on a virtual server, apache2 based

Error 20090121024122 WARNING:   std/common.inc.php : 583 Could not set locale to 'de_DE.UTF8,de_DE@euro,de_DE,de,gede.utf8,deu,german'
Error 20090121024122           pages/login.inc.php : 239 -> setLang("de")
Error 20090121024122 std/class_pagehandler.inc.php : 738 -> loginFormSubmit()
Error 20090121024122                     index.php : 226 -> PageHandler::show("loginFormSubmit")
Error 20090121024122 
Error 20090121024122      Variables in setLang():
Error 20090121024122                          lang = de
Error 20090121024122                        g_lang = de
Error 20090121024122                      filepath = lang/de.inc.php
Error 20090121024122                  g_lang_table = Array
Error 20090121024122                        locale = de_DE.UTF8,de_DE@euro,de_DE,de,gede.utf8,deu,german
Error 20090121024122                           res = NULL
Error 20090121024122    v0.0901, loginFormSubmit, from xxx.xxx.xxx.xxx,  uri:/wid_pm/index.php
Error 20090121024122 

Issue report

Minor
Have not tried
Apache/2.2.8 Server, PHP5.2.4
0.0901
 

1 Comments

pixtur:Sounds like we should make this warning customizeable

9 years ago

Locale-settings are a tricky business. Not all server provide all local-settings for all languages. As pointed out by the comment...

from common.inc.php

        // this warning might be annoying, but we need a way to detect that setlocale failed
        // eventually the list of locales will be long enough to include all supported platforms
        if($res === FALSE) {
            trigger_error("Could not set locale to '$locale'", E_USER_WARNING);
        }

I changed the code from printing an error to added a message to errors.log.php, if debug-logging is enabled like this:

confChange('LOG_LEVEL', LOG_MESSAGE_ALL);