> I have found some problems (and possible solutions) concerning use
of the
> gettext extension on multithreaded servers.

The gettext library caches information in static variables..... This
is true in gettext 0.10.40 at least, which is that last that I looked
in. This has a number of "features" that are less than desirable with
PHP.

First - thread safety.... what thread saftey ?

Second - as the locale is cached in static data when gettext is first
initialized, I have yet to figure out how you could use this to
support multiple locales in series (ie Apache 1.3) much less in
parallel (Apache 2.0 with worker). I found that after changing the
local variable, and then reopening the cat file that I was getting the
old local, which is why I went looking into this. This of course was
made more fun by that fact that I had 20 Apache procs running - each
with a different cached locale as I was trying to figure out my semi
random results.

Maybe I missed something when I was looking into this (like some other
way to call gettext). If so I would love to hear about it.

dave




-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to