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.
After that, we will install mbstring in PHP 8.1, PHP 8.0, and PHP 7.
Now, we will install mbstring in PHP 8.1 version using the following command.
sudo apt-get install php8.1-mbstring
Now, we will install mbstring in PHP 8.0 version using the following command.
sudo apt-get install php8.0-mbstring
Now, we will install mbstring in PHP 7.4 version using the following command.
sudo apt-get install php7.4-mbstring
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:
- Read Also: How To Change Text In Laravel 9 Datatable
- Read Also: 500 Internal Server Error In Laravel 9 AJAX
- Read Also: How To Fix cURL Error 60 SSL Certificate Problem
- Read Also: How To Solve The Page Expired 419 Error In Laravel