Fatal error: Uncaught Error: Call to Undefined Function mb_substr_count()

Asked

Viewed 229 times

2

When using the function mb_substr_count , is returned the error below. I already installed mb_substr using the command -> sudo apt-get install php-mbstring , and rebooted but did not resolve..

Fatal error: Uncaught Error: Call to undefined function mb_substr_count() 

3 answers

1

Access your php.ini, search extension=e look at the list of extensions. If there is none with the name mbstring, the extension should be installed. If the line is commented (if you have ; in front), then it is not activated ... remove the ; and restart the Apache

1

There’s the command php -m listing the modules installed.

The command below will search between the modules the mbstring and return some result if it is already installed:

php -m | grep mbstring

If no message appears on the terminal, try installing with the command:

sudo apt install php-mbstring

After installation, restart the service with the command:

sudo systemctl restart apache2

0


Solved by installing mbstring via console sudo apt-get install php7.2-mbstring

Browser other questions tagged

You are not signed in. Login or sign up in order to post.