Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Setting locale to en_US.UTF-8" problem after new install OC 6.0.2 #8437

Closed
benoyst opened this issue May 2, 2014 · 14 comments

Comments

@benoyst
Copy link

commented May 2, 2014

Hi all!
After a clean owncloud install on a freshly installed server, I've the following error on the index.php page, just before being able to configure owncloud on its web interface.

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 theses locales on your system and restart your webserver.

I've installed these locales and the message keeps showing up.

Using nginx (nginx-naxsi 1.2.1-2.2+wheezy2) on debian stable (7.5).
dpkg-reconfigure locales done a few time, default being en_US.UTF-8.

$ grep en_US.UTF-8 /etc/locale.gen
en_US.UTF-8 UTF-8
$ cat /etc/environment
LC_ALL=en_US.UTF-8
LANG=en_US.UTF-8
LANGUAGE=en_US.UTF-8

I've switched to the www-data account and tested my locales there:
$ id
uid=33(www-data) gid=33(www-data) groups=33(www-data)
$ locale
LANG=en_US.UTF-8
LANGUAGE=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=en_US.UTF-8

$ curl -I http://my-server
HTTP/1.1 200 OK (...)
Content-Type: text/html; charset=utf-8

So really I'm a bit lost: how to set the locale to this system correctly?
Any help MUCH appreciated :)

Many thanks

-- Ben

@karlitschek

This comment has been minimized.

Copy link
Member

commented May 2, 2014

Have you tried to restart the webserver after the installation of the missing packages ?

@DeepDiver1975

This comment has been minimized.

Copy link
Member

commented May 3, 2014

Generally speaking you only need to install that locale. There is no need to set it.

Did you restart the web server after installing the locale?

Von Samsung Mobile gesendet

-------- Ursprüngliche Nachricht --------
Von: benoyst notifications@github.com
Datum:02.05.2014 22:30 (GMT+01:00)
An: owncloud/core core@noreply.github.com
Betreff: [core] "Setting locale to en_US.UTF-8" problem after new install OC
6.0.2 (#8437)

Hi all!
After a clean owncloud install on a freshly installed server, I've the following error on the index.php page, just before being able to configure owncloud on its web interface.

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 theses locales on your system and restart your webserver.

I've installed these locales and the message keeps showing up.

Using nginx (nginx-naxsi 1.2.1-2.2+wheezy2) on debian stable (7.5).
dpkg-reconfigure locales done a few time, default being en_US.UTF-8.

$ grep en_US.UTF-8 /etc/locale.gen
en_US.UTF-8 UTF-8
$ cat /etc/environment
LC_ALL=en_US.UTF-8
LANG=en_US.UTF-8
LANGUAGE=en_US.UTF-8

I've switched to the www-data account and tested my locales there:
$ id
uid=33(www-data) gid=33(www-data) groups=33(www-data)
$ locale
LANG=en_US.UTF-8
LANGUAGE=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=en_US.UTF-8

$ curl -I http://my-server
HTTP/1.1 200 OK (...)
Content-Type: text/html; charset=utf-8

So really I'm a bit lost: how to set the locale to this system correctly?
Any help MUCH appreciated :)

Many thanks

-- Ben


Reply to this email directly or view it on GitHub.

@benoyst

This comment has been minimized.

Copy link
Author

commented May 3, 2014

Update: it's now working ; I've NOT yet found out what happened but I'm investigating.
So far I've added:
/etc/php5/cli/php.ini:intl.default_locale = en_US.UTF-8
and added a few dirs in my php-fm chroot-like with locales.
I'm rebuilding the whole archive and will let you know what happened.
Will also upgrade to OC 6.0.3.

@PVince81 PVince81 added the Bug label May 5, 2014
@benoyst

This comment has been minimized.

Copy link
Author

commented May 9, 2014

Last and final update: I can confirm that I've solved the problem. As I struggled a little on this one I'm putting some details here if anyone is interested in the future.

The issue was a fairly strict php-fpm configuration, following this setup:
http://tech-blog.clericare.com/2013/08/how-to-deploy-owncloud-with-postgresql.html

which did not allow proper locale configuration for OC.

The solution is to change the general php.ini file (debian: /etc/php5/cli/php.ini) and add to the [intl] section the following line:
intl.default_locale = en_US.UTF-8

Now it's working.
Many thanks to all.

Ben

@kihitara

This comment has been minimized.

Copy link

commented Sep 1, 2014

I got this, too. Unfortunately, I'm trying to run this on my domain which is on a shared hosting platform, so there is nothing I can do about messing with the actual webserver. Oh well. My excitement about trying this was short-lived.

@karlitschek

This comment has been minimized.

Copy link
Member

commented Dec 5, 2014

fixed by installing all the missing dependencies.

@karlitschek karlitschek closed this Dec 5, 2014
@RobinJ1995

This comment has been minimized.

Copy link

commented Dec 7, 2014

Same problem on 7.0.3. Not fixed by adding line to php.ini.

@DeepDiver1975

This comment has been minimized.

Copy link
Member

commented Dec 8, 2014

No need to mess around with php.ini. the locale has to be installed. This might not be possible with a shared hoster, but we require this otherwise you might loose files which we think is not a good idea ;-)

@RobinJ1995

This comment has been minimized.

Copy link

commented Dec 8, 2014

The locale is installed :)

@DeepDiver1975

This comment has been minimized.

Copy link
Member

commented Dec 8, 2014

The locale is installed :)

web server restarted?

@RobinJ1995

This comment has been minimized.

Copy link

commented Dec 8, 2014

Yes.

@kripton

This comment has been minimized.

Copy link

commented Jan 17, 2015

I have my webserver (and php-fpm) running in a chroot and hit the same problem. From https://flexichat.net/chroot-php-fpm this sentence solved the problem for me: "for correctness of dynamically linked programs and charset translations via iconv() you will need locales and gconv modules, /usr/lib/locale and /usr/lib/gconv". So I copied all that to my chroot and ownCloud was working again

@hevakelcj

This comment has been minimized.

Copy link

commented Jul 24, 2018

I got this problem today.
I run locale as root, it said:
root@raspberrypi:~# locale LANG=en_GB.UTF-8 LANGUAGE= LC_CTYPE="en_GB.UTF-8" LC_NUMERIC="en_GB.UTF-8" LC_TIME="en_GB.UTF-8" LC_COLLATE="en_GB.UTF-8" LC_MONETARY="en_GB.UTF-8" LC_MESSAGES="en_GB.UTF-8" LC_PAPER="en_GB.UTF-8" LC_NAME="en_GB.UTF-8" LC_ADDRESS="en_GB.UTF-8" LC_TELEPHONE="en_GB.UTF-8" LC_MEASUREMENT="en_GB.UTF-8" LC_IDENTIFICATION="en_GB.UTF-8" LC_ALL=

I found that en_GB.UTF-8 is not included in owncloud exception message.
Then, I modifed /etc/locale.gen, comment en_GB.UTF-8 and uncomment en_US.UTF-8, run locale-gen
At last, this problem is fixed.

@lock

This comment has been minimized.

Copy link

commented Jul 30, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
8 participants
You can’t perform that action at this time.