ID: 31594 Updated by: [EMAIL PROTECTED] Reported By: per at computer dot org -Status: Assigned +Status: Bogus Bug Type: Apache2 related Operating System: linux 2.4.26 PHP Version: 5.*, 4.* Assigned To: iliaa New Comment:
setlocale() function changes environment settings, that is its job, nothing more nothing less. In the case of Apache this change affects other operations, that depend on chartset settings. In your case the affect is adverse, to avoid the problem perform the affected operation either after the change or restore the defaults before calling virtual(). Previous Comments: ------------------------------------------------------------------------ [2006-01-03 08:46:12] [EMAIL PROTECTED] I'm not gonna touch this more than this, Ilia, have fun. ------------------------------------------------------------------------ [2006-01-03 08:34:25] per at computer dot org I can kind of understand that you guys can't be bothered to do much more, but I have to ask: 1) why is there such a call as setlocale() if it it doesn't work or is at best unreliable? Sniper, given your last comment, should I open a doc-bug to have that entered in the documentation? "DO NOT USE"? It's the only possible conclusion. 2) How do I get e.g. a date formatted using strftime() according to a different locale than apaches? And finally - isn't a bit of a fiasco not to be able to fix a solidly reproducable bug? ------------------------------------------------------------------------ [2006-01-02 23:20:21] [EMAIL PROTECTED] As told you by Joe and Ilia: Don't do it. The only safe and truly working way of setting such environment variables is using apache_setenv(). ------------------------------------------------------------------------ [2006-01-02 14:16:26] per at computer dot org Well, I didn't get very far - applied the patch to 4.3.10, but here it stopped working. ------------------------------------------------------------------------ [2006-01-02 13:24:39] per at computer dot org OK, I can confirm that patch working in 4.3.9, but not in the php5.1 snapshot. I'll work my way through the 4.3.x versions up to 4.4.x and let you know. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/31594 -- Edit this bug report at http://bugs.php.net/?id=31594&edit=1