Call To Undefined Function mb_strcut() In Laravel

    In this article, we will see the call to undefined function mb_strcut() in laravel. Here, we will learn how to solve a call to an undefined function mb_strcut(). In the ubuntu system, this error occurs when installing PHP and composer.

    So, let's see laravel 9 call to undefined function mb_strcut(), call to undefined function laravel, how to solve call to undefined function mb_strcut() and how to install mbstring in ubuntu.

    Using the following code we will check mbstring is available or not. mbstring provides multibyte specific string functions that help you deal with multibyte encodings in PHP.

php -m | grep mbstring

    After that, we will install mbstring in PHP 8.1, PHP 8.0, and PHP 7.

Install mbstring in PHP 8.1

     Now, we will install mbstring in PHP 8.1 version using the following command.

sudo apt-get install php8.1-mbstring
Install mbstring in PHP 8.0

     Now, we will install mbstring in PHP 8.0 version using the following command.

sudo apt-get install php8.0-mbstring
Install mbstring in PHP 7.4

     Now, we will install mbstring in PHP 7.4 version using the following command.

sudo apt-get install php7.4-mbstring
Install php-mbstring Using apt-get

    Update the apt database with apt-get using the following command.

sudo apt-get update

    After updating the apt database, We can install php-mbstring using apt-get by running the following command.

sudo apt-get -y install php-mbstring

    You might also like:

Bình luận
Vui lòng đăng nhập để bình luận
Một số bài viết liên quan