Добрый день. Столкнулся с тем, что php не воспринимает системные настройки локали:
root@test4:~# locale
LANG=ru_RU.CP1251
LANGUAGE=ru
LC_CTYPE="ru_RU.CP1251"
LC_NUMERIC="ru_RU.CP1251"
LC_TIME="ru_RU.CP1251"
LC_COLLATE="ru_RU.CP1251"
LC_MONETARY="ru_RU.CP1251"
LC_MESSAGES="ru_RU.CP1251"
LC_PAPER="ru_RU.CP1251"
LC_NAME="ru_RU.CP1251"
LC_ADDRESS="ru_RU.CP1251"
LC_TELEPHONE="ru_RU.CP1251"
LC_MEASUREMENT="ru_RU.CP1251"
LC_IDENTIFICATION="ru_RU.CP1251"
LC_ALL=
root@test4:~# php -r "echo (10.10);"
10.1
root@test4:~# php -r "echo setlocale(LC_ALL, 0);"
LC_CTYPE=ru_RU.CP1251;LC_NUMERIC=C;LC_TIME=C;LC_COLLATE=C;LC_MONETARY=C;LC_MESSAGES=C;LC_PAPER=C;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=C;LC_IDENTIFICATION=C
root@test4:~# php -r "setlocale(LC_NUMERIC,'ru_RU.CP1251'); echo (10.10);"
10,1
root@test4:~# php -v
PHP 7.0.12-1+deb.sury.org~trusty+1 (cli) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.12-1+deb.sury.org~trusty+1, Copyright (c) 1999-2016, by Zend Technologies
root@test4:~# locale -a
C
C.UTF-8
POSIX
ru_RU.cp1251
ru_RU.utf8