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)

  1. In WHM, open Software › EasyApache 4.
  2. Click Customize next to the current profile, and open PHP Extensions.
  3. Search for mbstring and enable it for each PHP version you use (for example ea-php83-php-mbstring).
  4. 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).

Related services

KVM VPS hosting

NVMe SSD and full root access, with Free Basic Managed Support.

Managed cPanel VPS

cPanel included; we handle updates, security and monitoring.

Server management

on-demand administration, hardening, migrations and monitoring.

Was this answer helpful?

Still stuck? Open a ticket