6

I'm getting error

Call to undefined function FOS\UserBundle\Util\mb_convert_case() app_path/vendor/bundles/FOS/UserBundle/Util/Canonicalizer.php on line 18

It occurs when I try to load fixtures.

First step was to install mbstring.so ext, so I compiled php with

--enable-mbstring

than successfully copiled mbstring ext

phpize
./configure
make
make install

and added

extension=mbstring.so

to my php.ini file. Unfortunately I still got that error and php -m doesn't display mbstring as loaded extension. What's wrong?

Any help will be greatly appreciated.

PHP 5.4.7, Debian Lenny

from php check.php output

[[WARNING]] Checking that the mb_strlen() function is available: FAILED
            *** Install and enable the mbstring extension ***
zachar
  • 1,085
  • 1
  • 11
  • 18
  • 1
    Did you restart httpd after the change? And check http's error log and php error log – Marcin Orlowski Oct 15 '12 at 11:11
  • I did. Second part of your comment gave me a clue: PHP Startup: Invalid library (maybe not a PHP library) 'mbstring.so' in Unknown on line 0. Probably I will need to compile it one more time. – zachar Oct 15 '12 at 11:15
  • is there any reason you are still on Lenny? Or is there any reason you are building it from sources? – Marcin Orlowski Oct 15 '12 at 14:38
  • This time I haven't got any choice and I must struggle with Lenny. I'm building it from sources, because nowdays thats the only way to get new version of php and others for Lenny. Anyways, compiling it once again from sources worked and I don't now why it didn't earlier. Thanks for your advices :) – zachar Oct 15 '12 at 14:46
  • Have you tried http://dotdeb.org/ for Lenny binaries of PHP and related modules? He also got a receipe (see their README of FAQ - do not remember) in case you do not have the one you need. – Marcin Orlowski Oct 15 '12 at 14:50
  • yup - dotdeb.org repositories for Lenny are already dead – zachar Oct 15 '12 at 15:00

3 Answers3

6

on CentOS, for example, you will need to install this php module:

yum install php-mbstring

as written on https://stackoverflow.com/a/1216284/2071028

Community
  • 1
  • 1
mr.baby123
  • 2,208
  • 23
  • 12
3

On debian, install the module php-mbstring

apt-get install php-mbstring

If necessary restart apache2

service apache2 restart
0

If you are using Windows try to set the extension in php.ini with full path e.g: extension="/FULL/PATH/mbstring.so". In other case you need to put mbstring.so file inside your modules directory (where all others .so are located).

Bruno
  • 924
  • 9
  • 20