Re: setlocale Apache/PHP problem - tentative bug.

From: Date: Thu, 07 Oct 1999 22:29:30 +0000
Subject: Re: setlocale Apache/PHP problem - tentative bug.
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-11614@lists.php.net to get a copy of this message
On Fri, 8 Oct 1999, Jouni Ahto wrote: > I disagree, but only slightly. The proper thing to do is to set locale to > "C" if it was changed, which is the state (i mean "C", of course) in which > programs start and stay, unless they explicitly call setlocale to change > it. PHP doesn't and webservers (to my knowledge) generally don't. If this > breaks some webserver, only then should it be necessary to actually save > the state of current locale at request startup and restore it at request > end, mainly because it saves us the overhead of calling setlocale on every > request if not necessary. But if the webserver's locale is /not/ set to C, then having PHP set the locale to C when the script exits would modify the behavior of the webserver. This is not appropriate. If I as an administrator change the locale Apache uses, I don't want PHP scripts to be able to change it, and I don't want mod_php to unset it, either. -Steve Langasek postmodern programmer

« previous php.dev (#11614) next »