php-v:7.0.18
phpmyadmin 版本:4:4.6.4+dfsg1-1
apache2版本:Apache/2.4.18 (Ubuntu)
apache2中的错误信息:
[Mon Aug 07 22:24:15.752031 2017] [:error] [pid 18459] [client 127.0.0.1:53360] PHP Fatal error: Uncaught Error: Call to undefined function mb_detect_encoding() in /usr/share/php/php-php-gettext/gettext.inc:177nStack trace:n#0 /usr/share/php/php-php-gettext/gettext.inc(279): _encode('The %s extensio...')n#1 /usr/share/php/php-php-gettext/gettext.inc(286): _gettext('The %s extensio...')n#2 /var/www/html/phpmyadmin/libraries/core.lib.php(306): __('The %s extensio...')n#3 /var/www/html/phpmyadmin/libraries/core.lib.php(961): PMA_warnMissingExtension('mbstring', true)n#4 /var/www/html/phpmyadmin/libraries/common.inc.php(102): PMA_checkExtensions()n#5 /var/www/html/phpmyadmin/index.php(13): require_once('/var/www/html/p...')n#6 {main}n thrown in /usr/share/php/php-php-gettext/gettext.inc on line 177
这次百度赢了,以下是答案部分。
出现这个问题,是因为 PHP的mbstring 扩展没有打开,或者说PHP扩展路径没有被正确指定
其中 D:/Program Files/localhost/Bin/Php/ext 是指 php_mbstring.dll 文件存放的目录,也就是PHP扩展目录(PHP目录下的ext目录),请修改此目录路径为你的实际路径。
修改完后重新启动服务器即可。
来自百度知友solorismux。
虽然是ubuntu系统,找到php.ini后,将extension=php_mbstring.dll前的分号去掉,成功解决。