S
S
Sergey Melodin2018-04-21 13:41:14
linux
Sergey Melodin, 2018-04-21 13:41:14

Why doesn't mb_strtolower work in Vagrant?

Virtual machine - Ubuntu 16.04
Installed locale ru_RU.UTF-8 via sudo locale-genand localectl set-locale LANG=, got the following result:

vagrant$locale
LANG=ru_RU.utf8
LANGUAGE=
LC_CTYPE="ru_RU.utf8"
LC_NUMERIC="ru_RU.utf8"
LC_TIME="ru_RU.utf8"
LC_COLLATE="ru_RU.utf8"
LC_MONETARY="ru_RU.utf8"
LC_MESSAGES="ru_RU.utf8"
LC_PAPER="ru_RU.utf8"
LC_NAME="ru_RU.utf8"
LC_ADDRESS="ru_RU.utf8"
LC_TELEPHONE="ru_RU.utf8"
LC_MEASUREMENT="ru_RU.utf8"
LC_IDENTIFICATION="ru_RU.utf8"
LC_ALL=ru_RU.utf8


I tried to run mb_strtolower('Какой-то текст', 'UTF-8')- the script crashed. I went to the VPS (everything works there), looked at the settings:
VPS$locale
LANG=ru_RU.utf8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=en_US.UTF-8


I did the same for myself, the script still crashes. I tried mb_strtolowerwardumping and putting it in try-catch - it doesn't report anything. Maybe something else needs to be configured in the virtual system or needs to be registered in the Vagrantfile?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dave Hornigan, 2018-04-21
@melodyn

Deyv Horni @DeyvHorni
maybe the php-mbstring extension isn't installed at all?

T
toxa82, 2018-04-21
@toxa82

Maybe you don't have the mb module installed?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question