?
Solved

apache only works with gettext (localization) sometimes

Posted on 2010-01-10
2
Medium Priority
?
549 Views
Last Modified: 2013-12-12
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
Comment
Question by:mgab
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 27

Accepted Solution

by:
Nopius earned 2000 total points
ID: 26444776
> 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
 

Author Closing Comment

by:mgab
ID: 31675222
Will try it out but I am sure you're on the right track here!
0

Featured Post

WordPress Tutorial 3: Plugins, Themes, and Widgets

The three most common changes you will make to your website involve the look (themes), the functionality (plugins), and modular elements (widgets).

In this article we will briefly define each again, and give you directions on how to install them.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question