Hi-
I've been trying to get a simple PHP script running correctly which uses a locale setting:
Code:
<?php
setlocale(LC_ALL, 'de_DE.utf8');
echo strftime("%A %e %B %Y", mktime(0, 0, 0, 12, 22, 1978));
$loc_de = setlocale(LC_ALL, 'de_DE.ISO-8859-1', 'de_DE', 'de', 'ge');
echo "Preferred locale for german on this system is '$loc_de'";
?>
(this is an example off the strftime() help page on php.net)
strangely enough, when run in cli mode, the script outputs the correct value (German formatting) but returns the default english format and an empty string for $loc_de when run through a browser.
My setup is:
php5-fpm
nginx
ubuntu
The php.ini for cli and fpm are identical. Any ideas what could be going on?
Thanks