Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 551
  • Last Modified:

apache only works with gettext (localization) sometimes

One some restarts of my apache 2.2 webserver, it fails to "load"/bind my textdomains in php5 for localization of my websites.

For example, https://www.wineclubsouthafrica.co.uk/?mp=109 have a login-box to the upper right. Right now the text is in Swedish ("Inget konto än? Skapa konto här!") but after a few apache-restarts it's correctly localized into "No account yet? Create an account here!".

NOTE. I do not change any php-code, tags, config, .po/.mo-files or anything. The only thing that changes is the apache restarting.

Another note, if I get apache displaying my i18n/localization correct, the next day it fails to localize the same text again. Without a restart.

I am extremely confused. Any help is much appriciated!
0
mgab
Asked:
mgab
1 Solution
 
NopiusCommented:
> NOTE. I do not change any php-code, tags, config, .po/.mo-files or anything. The only thing that changes is the apache restarting.

Hello. I suggest you have systemwide sweden locale. When you connect to the system from any 'ssh' client it propagates your locale, not server's, so you are getting correct 'English' locale after connection and apache restart.

> Another note, if I get apache displaying my i18n/localization correct, the next day it fails to localize the same text again. Without a restart.

If you are on Linux, your apache is restarted once a day to rotate logs, so it's locale reverts back to system wide.

How to change system wide locale on Debian: http://gallery.menalto.com/wiki/Debian_locale_HowTo

You need to restart _server_ after changing default locale...
0
 
mgabAuthor Commented:
Will try it out but I am sure you're on the right track here!
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now