call to undefined function mb_strimwidth

一笑奈何 提交于 2019-12-04 03:34:43

All mb_* functions are provided by a PHP extension called Multibyte String, internal name mbstring

You probably don't have the extension active or installed. On most Linux distros you can install the package php-mbstring to install and activate this extension.

Apache needs to be restarted afterwards if you are using mod_php

Just got this issue, if you are using linux just install the package php-mbstringand restart Apache.

sudo apt-get install php-mbstring
sudo service apache2 restart

u need to install php-mbstring package try.

check php version

php -v

then check mbstring already install and enable

php -i | grep mbstring

if not installed run this command

sudo apt-get install php-mbstring

if you are php other version example : 7.1, 7.2, 7.0 based on run command like this :

sudo apt-get install php7.1-mbstring 

if you are using nginx server for run laravel .. then check nginx configration file which version u have loaded in conf file..

go to cd /etc/nginx/sites-available and open your configuration file.. if you are loading php7.2 version in nginx conf file..

fastcgi_pass unix:/var/run/php/php7.1-fpm.sock;

then u need to install 7.2 mbstring package..

sudo apt-get install php7.2-mbstring 

and restart apache2 server

 sudo service apache2 restart

if you already installed mbstring then you have to call this extension on php.ini file.

First, detect where is your php-fpm.ini file or php.ini.

run command

php -i | grep php.ini

it returns you path of php.ini file.

for example

/etc/php.ini

then open file with VIM or another editor

vim /etc/php.ini

and then add mbstring extension to php.ini file

extension=mbstring.so;

finally, restart php-fpm

systemctl restart php-fpm
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!