Locale Problem on Debian Buster


#1

Something has broken my ownCloud server. I’ve not changed anything, so probably it’s a recent debian package upgrade that has broken it. I am seeing:

Setting locale to en_US.UTF-8/fr_FR.UTF-8/es_ES.UTF-8/de_DE.UTF-8/ru_RU.UTF-8/pt_BR.UTF-8/it_IT.UTF-8/ja_JP.UTF-8/zh_CN.UTF-8 failed

Please install one of these locales on your system and restart your webserver.

However I have en_US installed:

$ locale -a | fgrep en_US
en_US
en_US.iso885915
en_US.utf8

So I’m stuck.


#2

Is the error message above an ownCloud error or your OS error?

Could you be more specific?


#3

That error comes from ownCloud and is shown on the main page instead of fields for user-name and password.


#4

The desktop client gives this message:

ownCloud 
Setting locale to en_US.UTF-8/fr_FR.UTF-8/es_ES.UTF-8/de_DE.UTF-8/ru_RU.UTF-8/pt_BR.UTF-8/it_IT.UTF-8/ja_JP.UTF-8/zh_CN.UTF-8 failed

Please install one of these locales on your system and restart your webserver. 
ownCloud – A safe home for all your data

#5

I have the same problem. I have tried to use different versions of php without luck.

$ locale -a
C
C.UTF-8
en_US.utf8
POSIX

I am using Debian buster, Apache/2.4.37 (Debian) OpenSSL/1.1.1 and PHP Version 7.2.9-1

The log reads:

{“reqId”:“NNBkyC8CFFrVwXPrakIx”,“level”:3,“time”:“2018-11-15T09:30:02-05:00”,“remoteAddr”:"",“user”:"–",“app”:“PHP”,“method”:"–",“url”:"–",“message”:“You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at /var/www/owncloud/lib/composer/patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php#18”}

I also have php7.2-intl installed

Package: php7.2-intl
Version: 7.2.9-1
New: yes
State: installed
Automatically installed: no
Priority: optional
Section: php
Maintainer: Debian PHP Maintainers team+pkg-php@tracker.debian.org
Architecture: amd64
Uncompressed Size: 524 k
Depends: php-common (>= 1:35), ucf, php7.2-common (= 7.2.9-1), libc6 (>= 2.14), libgcc1 (>= 1:3.0), libicu60 (>= 60.1-1~), libstdc++6 (>= 4.9)
Provides: php-intl
Description: Internationalisation module for PHP
This package provides the Internationalisation module(s) for PHP.

PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web
development and can be embedded into HTML.
Homepage: http://www.php.net/


#6

@dimitry could you please give us a hand?


#7

I have found this on GitHub.

Could you try it?


#8

I have changed the intl.default_locale to: en_US.UTF-8, see the relevant output of phpinfo() but the problem persists @dimitry, please help


#9

I don’t know the solution.

It seems like an web server / OS issue, and not rly an ownCloud issue.

In the GitHub issue that I send you people fixed their issue by adjusting the web server configs and the php configs.

I would google to find the solution.


#10

Is the dash before the 8 the issue? OC is looking for “en_US.UTF-8”, but the output of ‘locale -a’ has no dash:

locale -a | fgrep en_US
en_US
en_US.iso885915
en_US.utf8

#11

You can take it as granted that I did that before I asked for help here.


#12

I’m not 100% certain, but I think I had this same problem recently. I think I did these steps to fix it. I’m not sure, I didn’t take notes. Since then, I accidentally upgraded my php from 7.2 to 7.3, so I cannot test to see if this is the fix that did it or not.

Just in case I am remembering correctly, try looking here.

echo ; cat /etc/debian_version ; echo ; cat /etc/apache2/envvars | grep -ne "LANG\|locale" ; echo ; cat /etc/default/locale

buster/sid

25:## The locale used by some modules like mod_dav
26:export LANG=C
27:## Uncomment the following line to use the system default locale instead:
28:. /etc/default/locale
30:export LANG

#  File generated by update-locale
LANG="en_US.UTF-8"

#13

That was it, thank you @biffhero. I uncommented the ‘. ./etc/default/locale’ line in /etc/apache2/envvars and now it’s up again :slight_smile: