Updated: 28 September 2026 · Applies to: cPanel & WHM 138 (EasyApache 4), CloudLinux PHP Selector, Ubuntu 24.04, Debian 12, AlmaLinux 9 and Rocky Linux 9
Call to undefined function mb_strlen() means the PHP mbstring extension is not loaded for the PHP version your site uses. Many applications (WordPress plugins, Laravel, phpMyAdmin) need it.
cPanel & WHM server (root)
- In WHM, open Software › EasyApache 4.
- Click Customize next to the current profile, and open PHP Extensions.
- Search for
mbstringand enable it for each PHP version you use (for exampleea-php83-php-mbstring). - Click Review, then Provision.
From the command line the same is dnf install ea-php83-php-mbstring. Check with /opt/cpanel/ea-php83/root/usr/bin/php -m | grep mbstring.
cPanel account (CloudLinux PHP Selector)
If your hosting uses the PHP Selector, open Software › Select PHP Version in cPanel, go to Extensions, and tick mbstring. It applies at once.
Servers without cPanel
dnf install php-mbstring && systemctl restart php-fpm # AlmaLinux / Rocky apt install php8.3-mbstring && systemctl restart php8.3-fpm # Ubuntu 24.04 (php8.2 on Debian 12)
Reload the page afterwards. If the error remains, check that the website uses the PHP version you changed (Software › MultiPHP Manager in cPanel).