Laravel - Call to undefined function mb_strcut() - Solved
A few days ago I set up a new ubuntu system and installed PHP and composer. Then I was setup my old laravel application and tested it. Then send an email then I found "Call to undefined function mb_strcut()" issue with my application. I was thinking it will be because of laravel old version. Then I figure out what was the issue and how to resolve it.
I have the PHP 8.1 version and I need to install mbstring extension. I quickly check mbstring extension is there on my system or not by using the below command:
php -m | grep mbstring
Nothing found on above command then we need to install mbstring by following version vise solution:
Solution for PHP 8.1:
You need to install mbstring for php8.1 version.
sudo apt-get install php8.1-mbstring
Solution for PHP 8.0:
You need to install mbstring for php8.0 version.
sudo apt-get install php8.0-mbstring
Solution for PHP 7.4:
You need to install mbstring for php7.4 version.
sudo apt-get install php7.4-mbstring
Then, it was working for me.
I hope it can help you...
We are Recommending you
- Laravel Profile Image Upload Tutorial with Example
- How to Add Extra Field in Registration Form in Laravel?
- How to Enable and Disable Debug Mode in Laravel App?
- Laravel Passwordless Login with Magic Link Tutorial
- Laravel Eloquent Find by Column Name Example
- Laravel Global Variable for All Views Example
- Laravel Route Pass Multiple Parameters Example
- Laravel TCPDF: Generate HTML to PDF File Example
- Laravel Delete File After Download Response Example
- Laravel Carbon Count Working Days Between Two Dates Example
- Laravel Carbon Parse Date Format Example
- Laravel Carbon Time Format AM PM Example Code