Re: Zend Constants PATCH

From: Date: Tue, 18 Jun 2002 14:37:25 +0000
Subject: Re: Zend Constants PATCH
References: 1 2 3  Groups: php.dev 
Request: Send a blank email to php-dev+get-85303@lists.php.net to get a copy of this message
On June 18, 2002 10:07 am, Hartmut Holzgraefe wrote: > Sure set_locale() *works* for threaded environments, but it sets the locale > globaly for *all* threads, while it should the current PHP thread only. > Even worse: setting the locale may affect other components within the > webserver totally unrelated to PHP (or trigger the now known tolower() > and strtod() problems in other PHP threads, leading to wrong parser > behaviour) > > just imagine an ISP hosting a threaded server for international > customers or a big multinational company (or even a small one > with multi-lingual web pages) where a lot of scripts running in parallel > use set_locale() -> each of them overwrites the current locale for all > the other runnning scripts ... GOTCHA Well, that is true for any external variable not just locale. For example if you export TZ variable in a threaded enviroment all threads would be affected. Exporting a TZ would be even more dangerous since it would affect a commonly used data, dates, which are used in majority of PHP script. I do not see how this issue can be resolved, unless PHP does some internal enviroment variable tracking as well as internal locale tracking. Ilia

« previous php.dev (#85303) next »