1

I just upgraded from Xubuntu 19.10 to 20.04. This moved me from php 7.3 to php 7.4.3 and phpmyadmin 4.9.5+dsfg1-2.

Everything was working prior to the upgrade. Now, I can successfully access a test php web page and I can display the PHP_info.php page. However, when I try to access phpmyadmin, it throws a fatal error recorded in the apache2 error log file. Here it is, expanded for readability:

[Tue Sep 15 20:15:09.030096 2020] [php7:error] [pid 2092141] [client ###.###.###.###:53310]
PHP Fatal error:  Uncaught Error:
Call to undefined function PhpMyAdmin\\mb_strpos() in /usr/share/phpmyadmin/libraries/classes/Url.php:253
Stack trace:
#0 /usr/share/phpmyadmin/libraries/classes/Url.php(206): PhpMyAdmin\\Url::getArgSeparator()
#1 /usr/share/phpmyadmin/libraries/classes/Url.php(169): PhpMyAdmin\\Url::getCommonRaw()
#2 /usr/share/phpmyadmin/libraries/classes/Core.php(749): PhpMyAdmin\\Url::getCommon()
#3 /usr/share/phpmyadmin/libraries/classes/Core.php(330): PhpMyAdmin\\Core::linkURL()
#4 /usr/share/phpmyadmin/libraries/classes/Core.php(353): PhpMyAdmin\\Core::getPHPDocLink()
#5 /usr/share/phpmyadmin/libraries/classes/Core.php(973): PhpMyAdmin\\Core::warnMissingExtension()
#6 /usr/share/phpmyadmin/libraries/common.inc.php(106): PhpMyAdmin\\Core::checkExtensions()
#7 /usr/share/phpmyadmin/index.php(27): require_once('/usr/share/phpm...')
#8 {main}
  thrown in /usr/share/phpmyadmin/libraries/classes/Url.php on line 253, referer: http://<server>/html/admin.html

How is it that the function mb_strpos() is not defined?

Any suggestions on how to address this?

4

mb_strpos is not a default function in core PHP, it's contained in the mbstring extension. You can easily install it with sudo apt install php-mbstring

2
  • Thanks, that did it once I restarted apache2. It's interesting that this package was automatically installed and updated in the past for php 7.0 and 7.2, but not for 7.4. I appreciate the quick response. Sep 16 '20 at 23:50
  • I was thinking about that part and the only idea I came up with was maybe you installed it previously by specifying the php7.2-mbstring package rather than the php-mbstring virtual package. If so, it's possible Ubuntu didn't recognize php7.2-mbstring -> php7.4-mbstring was an upgrade path (they're separate packages, not just a different version) but hopefully you're set now by using the virtual package. Sep 17 '20 at 4:27
0

I had the same problem and it was because I was using php7.0-mbstring. Fixed it by installing php7.2-mbstring.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.