On Tue, 2008-09-02 at 14:21 +0200, Alexander Klink wrote:
> Hi Dennis,
> 
> On Mon, Sep 01, 2008 at 05:09:54AM -0700, Dennis Glatting wrote:
> > I am having a lot of trouble getting internationalization to work under
> > FreeBSD. Does anyone have it working? I wrote a test script (below) that
> > works fine under command-line PERL but when run under Apache2/mod_perl2
> > it breaks.
> 
> You've run into bug #1806325, see
> http://sourceforge.net/tracker/index.php?func=detail&aid=1806325&group_id=150124&atid=776757
> We've been trying to track this bug down, but unfortunately, this is
> not solved yet (we've managed to get closer to a solution, though).
> 
> For now, using Apache 1.3/mod_perl works, or using a different OS. Sorry
> that these are the only options right now.
> 

I tracked it pretty far. The problem is twofold. First, there are three
sets of locale routines: system routines, specifically setlocale();
libiconv, which is not part of the core system but an additional library
in /usr/local; and PERL's routines. Second, there are two environments:
the shell (e.g., /bin/sh) environment and PERL's %ENV environment.

It turned out that under mod_perl2 programs cannot modify the shell
environment (e.g., putenv()) because environ is not thread safe --
Apache2 locks out those changes. Changes to PERL's environment (i.e., %
ENV) through Locale:Messages work fine but there are three libraries
accessing two different environments that aren't synchronized because of
Apache2's lock.

I've lost the details but there is an environmental set routine inside
PERL called by mod_perl2 that fails, so PERL resets the locale
environment to C. Higher level routines, expecting the environment to be
changed, fail because environmental variables, such as LC_MESSAGES and
LANGUAGE, are not what they expected and the routines cannot
find /usr/local/locale or the proper language. I've fiddled with setting
the locale environmental variables in Apache's start script to match
those set in Locale::Messages but with limited success -- i.e., I
haven't discovered the reliable, repeatable incantation. 

It turns out this is a common problem. After I figured out what was
going on -- stumbling through lots of C code, I did a little research
and found various other complaints about shell variables under Apache2.

I punted and went back to Apache1 but Mason::ApacheHandler was failing
because it couldn't find Apache::Request. At that point, after four
14-hours days, I decided I was done with the project for a while.







-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
OpenXPKI-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openxpki-users

Reply via email to