phpMyAdmin says the mbstring extension is missing
The mbstring extension is missing. Please check your PHP configuration.Short answer
phpMyAdmin found no mbstring module in the PHP that serves it. Install the php-mbstring package on Ubuntu, or enable extension=mbstring in php.ini on Windows, then restart the web server. If it still shows, the web server loads a different php.ini than the one you edited.
Fix it fast
1Find out which cause you have
Ask PHP on the command line whether it has mbstring and which ini files it reads. The CLI and the web server can differ, so keep this result in mind for the third cause.
php -m | grep -i mbstring php --ini2Match what you see, then jump to its fix
- 1
php -m prints nothing for mbstringThe mbstring package is not installed (Ubuntu)Fix - 2
phpinfo() has no mbstring section; php.ini has ;extension=mbstring or no such lineThe extension line is off in php.ini (Windows)Fix - 3
php -m shows mbstring but the phpMyAdmin page still complainsThe web server reads a different php.ini than the one you editedFix
- 1
What does the error look like?
The mbstring extension is missing. Please check your PHP configuration.
Cause 1 of 3
The mbstring package is not installed (Ubuntu)
1Check
Ubuntu ships the module as a separate package. php-mbstring pulls in the one for your PHP version (php8.3-mbstring on 24.04), and the phpmyadmin package itself depends on php-mbstring.
dpkg -l | grep -i mbstring2Fix
Install it and restart Apache so the running web server loads it.
sudo apt install php-mbstring
sudo systemctl restart apache23Verify
Reload phpMyAdmin; the red message is gone. php -m now lists mbstring.
php -m | grep -i mbstringConfirmed by packages.ubuntu.com
Cause 2 of 3
The extension line is off in php.ini (Windows)
1Check
On Windows the module is a DLL in the ext folder, switched on in php.ini. Since PHP 7.2 the extension name can be used instead of the file name, and extension_dir must point at the ext folder.
php --ini
dir C:\php\ext\php_mbstring.dll2Fix
Remove the semicolon from the line (or add it), check extension_dir, save, and restart the web server.
extension_dir = "C:\php\ext"
extension=mbstring3Verify
The phpinfo() page now shows an mbstring section.
php -m | findstr mbstringConfirmed by php.net
Cause 3 of 3
The web server reads a different php.ini than the one you edited
1Check
PHP chooses its ini file per SAPI. Apache's module reads it once, when the server starts, so edits need a restart. A phpinfo() page opened in the browser shows the web server's Loaded Configuration File, which can differ from the terminal's.
<?php
// temporary file in the web root, delete it afterwards
phpinfo();2Fix
Edit the file that the browser's phpinfo() names, then restart the web server.
sudo systemctl restart apache23Verify
Reload the phpinfo() page and look for an mbstring section, then reload phpMyAdmin.
curl -s http://localhost/phpmyadmin/ | head -n 5Confirmed by php.net
How do I stop it coming back?
- Install phpMyAdmin from your distribution's package so its PHP dependencies come with it.
- Delete any phpinfo() test file as soon as you are done.
- After a PHP version upgrade, check that the new version has the same extensions as the old one.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Projects of mine built on the same technologies:
Related fixes
Back end
WordPress says PHP is missing the MySQL extension
Your PHP installation appears to be missing the MySQL extension which is required by WordPress.
WordPress lists mysqli among the PHP extensions it requires, because it uses it to talk to MySQL or MariaDB.
3 causes, each with a fixBack end
Apache returns 503 or 504 because PHP-FPM did not answer in time
Error dispatching request
Apache sent the request to PHP-FPM and gave up waiting.
3 causes, each with a fixBack end
AWS SDK for PHP cannot get credentials from the instance profile metadata server
Error retrieving credentials from the instance profile metadata server.
The SDK tries the EC2 instance metadata service when it has no valid credentials from anywhere earlier in its chain.
4 causes, each with a fixBack end
AWS SDK for PHP rejects requests: the signature is from the future
Signature not yet current: {date} is still later than {date}
AWS compares the timestamp in your signed request with its own clock.
2 causes, each with a fixBack end
CodeIgniter 4 cannot write its cache files
CodeIgniter\Cache\Exceptions\CacheException: Cache unable to write to /var/www/app/writable/cache/
CodeIgniter 4's file cache needs a cache directory that the web server can really write to.
2 causes, each with a fixBack end
CodeIgniter 3 loads the model but the property is undefined
The model name you are loading is the name of a resource that is already being used: user
CodeIgniter 3 expects a model file named like its class, with the first letter capitalised, for example User_model.php holding class User_model.
2 causes, each with a fix