[Incidencias #14489] Re: HORDE: PHP ERROR: setlocale(): Specified locale name is too long [pid 428 on line 138 of "/usr/share/pear/Horde/Registry/Nlsconfig.php"]

noreply at bugs.horde.org noreply at bugs.horde.org
Thu Oct 13 23:47:04 UTC 2016


NO CONTESTE A ESTE MENSAJE. ESTA DIRECCIÓN NO SE CONSULTA.

URL de la incidencia: https://bugs.horde.org/ticket/14489
------------------------------------------------------------------------------
  Incidencia        | 14489
  Actualizado por   | carlos.velasco at nimastelecom.com
  Resumen           | HORDE: PHP ERROR: setlocale(): Specified locale name is
                    | too long [pid 428 on line 138 of
                    | "/usr/share/pear/Horde/Registry/Nlsconfig.php"]
  Cola              | Horde Framework Packages
  Tipo              | Bug
  Estado            | Unconfirmed
  Prioridad         | 2. Medium
  Milestone         |
  Patch             |
  Propietarios      |
------------------------------------------------------------------------------


carlos.velasco at nimastelecom.com (2016-10-13 23:37) escribió:

After installing Horde this error is showed in logs repeatedly.

Oct 14 01:17:07 user:warning HORDE: HORDE: PHP ERROR: setlocale():  
Specified locale name is too long [pid 428 on line 138 of  
"/usr/share/pear/Horde/Registry/Nlsconfig.php"]
Oct 14 01:17:07 user:warning HORDE: HORDE: PHP ERROR: setlocale():  
Specified locale name is too long [pid 428 on line 138 of  
"/usr/share/pear/Horde/Registry/Nlsconfig.php"]
Oct 14 01:17:07 user:warning HORDE: HORDE: PHP ERROR: setlocale():  
Specified locale name is too long [pid 428 on line 138 of  
"/usr/share/pear/Horde/Registry/Nlsconfig.php"]

Nlsconfig.php:
                 if (setlocale(LC_ALL, $lang . '.UTF-8')) {
                     $valid = true;
                 }
                 setlocale(LC_ALL, $locale); <---- error here


The problem is related to a limit of 255 in string.c in php code.
Current locale in this machine is:
# locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

This is 255+.

Here there is a complete description of the problem with a possible  
workaround passing an array insted of a string:
http://stackoverflow.com/questions/16110866/why-do-i-get-this-php-warning-setlocale-specified-locale-name-is-too-long






More information about the bugs mailing list