php locale setting working in cli but not in fpm
I've been trying to get a simple PHP script running correctly which uses a locale setting:
(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
7 Replies
Is there a way of keeping the chroot and being able to access the locale information? I have to admit I haven't really understood where the locale strings are stored anyway…
However the locals I believe are stored in /usr/share/locale/ so copy the ones you need into the chroot.
take a look at jailkit
If worse comes to worse, debootstrap and chroot. I've used that to quickly test something under Debian or other releases without having to do the whole deploy-a-VM tango. It feels wrong, but sometimes I dig that.
Thanks for your help!