6.0.0-beta1
8/28/25

[#14489] HORDE: PHP ERROR: setlocale(): Specified locale name is too long [pid 428 on line 138 of "/usr/share/pear/Horde/Registry/Nlsconfig.php"]
Summary HORDE: PHP ERROR: setlocale(): Specified locale name is too long [pid 428 on line 138 of "/usr/share/pear/Horde/Registry/Nlsconfig.php"]
Queue Horde Framework Packages
Type Bug
State Resolved
Priority 2. Medium
Owners jan (at) horde (dot) org
Requester carlos.velasco (at) nimastelecom (dot) com
Created 10/13/2016 (3241 days ago)
Due
Updated 10/14/2016 (3240 days ago)
Assigned
Resolved 10/14/2016 (3240 days ago)
Github Issue Link
Github Pull Request
Milestone Horde_Core 2.27.1
Patch No

History
10/14/2016 02:54:56 PM Jan Schneider Assigned to Jan Schneider
State ⇒ Resolved
Milestone ⇒ Horde_Core 2.27.1
 
10/14/2016 02:54:45 PM Git Commit Comment #3 Reply to this comment
Changes have been made in Git (master):

commit 13d23429a660a737832f934ff335e651e1094483
Author: Jan Schneider <jan@horde.org>
Date:   Fri Oct 14 16:54:24 2016 +0200

     [jan] Fix warning if an old locale is longer than 255 characters 
(Bug #14489).

  framework/Core/lib/Horde/Registry/Nlsconfig.php | 12 +++++++++++-
  framework/Core/package.xml                      |  2 ++
  2 files changed, 13 insertions(+), 1 deletion(-)

http://github.com/horde/horde/commit/13d23429a660a737832f934ff335e651e1094483
10/13/2016 11:56:22 PM carlos (dot) velasco (at) nimastelecom (dot) com Comment #2 Reply to this comment
10/13/2016 11:37:40 PM carlos (dot) velasco (at) nimastelecom (dot) com Comment #1
Priority ⇒ 2. Medium
Patch ⇒ No
Milestone ⇒
Queue ⇒ Horde Framework Packages
Summary ⇒ HORDE: PHP ERROR: setlocale(): Specified locale name is too long [pid 428 on line 138 of "/usr/share/pear/Horde/Registry/Nlsconfig.php"]
Type ⇒ Bug
State ⇒ Unconfirmed
Reply to this comment
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

Saved Queries