PHP 4.0 Bug #2958: setlocale setting is preserved across invocations (from #2949)
| From: | php-bug at vogtner dot de | Date: | Sat, 11 Dec 1999 13:30:18 +0000 |
| Subject: | PHP 4.0 Bug #2958: setlocale setting is preserved across invocations (from #2949) | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-13580@lists.php.net to get a copy of this message | ||
From: php-bug@vogtner.de
Operating system: UNIX
PHP version: 4.0 Beta 3
PHP Bug Type: Misbehaving function
Bug description: setlocale setting is preserved across invocations (from #2949)
Assume two files. First be a.php3:
<%
setlocale ('LC_ALL', "de_DE"); // dec. sep = ,
$z = 3.4;
echo $z;
%>
and second b.php3:
<%
$z = 3.4;
echo $z;
%>
After invocation of a.php3 the locale state is preserved
within the apache process. If the invocation of b.php3
is processed by this apache process, b.php3 yields
3,4 instead of 3.4.
"hotfix": ensure that after each invocation of the
PHP engine the locale setting is re-set by calling
setlocale (LC_ALL, "C") or setlocale (LC_ALL, "POSIX") or
what ever is the default on the OS/machine at apache
startup.