Re: setlocale madness... please help!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Roman Neuhauser wrote:
> # jochem@xxxxxxxxxxxxx / 2006-11-03 16:16:11 +0100:
>> Roman Neuhauser wrote:
>>> # jochem@xxxxxxxxxxxxx / 2006-11-03 14:51:39 +0100:
>>>> 1. running the command 'locale -a' returns the following [shortened] list:
>>>>

...

> 
>>>> in fact I can set any installed locale I want on the commandline BUT
>>>> trying to set any other than the originally installed "nl_NL@euro" in
>>>> code running via Apache results in FALSE being returned and the locale
>>>> not being set.
>>>>
>>>> has anybody got a clue for me?
>>>     You don't mention what warning(s) the failing setlocale() call produces.
>> it just returns false, telling me that the chosen locale(s) was/were not set - there
>> is no PHP error at all.
> 
>     I just checked the setlocale() code (in HEAD), and surely it can
>     return false without a warning, it can even be an almost empty (and
>     just as quiet) stub that just returns false, depending on the value
>     of HAVE_SETLOCALE during compilation.

thank you for doing this ... turns out that indeed the locale is being set
but the return value is false, I've settled for not checking the return value and
just assuming (blindly hoping) the setlocale worked - I don't really know what
else there is to do, besides ik works :-)

> 
>     So, before you go off recompiling mod_php with a few printf() and
>     perror() calls here and there, you should find out whether it's PHP
>     or Apache that makes the call fail. 

compiling php is not a problem but I'm not really at the stage I feel
I cando anything useful by changing the C source - although your remark
does inspire somewhat.

>   Try a simple CGI script, does
>     locale manipulation succeed there?

I'd have to look up how to setup a php-cgi ...
not really in the mood on friday evening :-)

anyway thanks for your input, you just saved me from an evening of brain pain ;-)


> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux