PHPmyadmin问题 - 致命错误:未捕获错误:调用未定义函数mb_detect_encoding()

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了PHPmyadmin问题 - 致命错误:未捕获错误:调用未定义函数mb_detect_encoding()相关的知识,希望对你有一定的参考价值。

当我尝试从我的localhost运行phpmyadmin时,我一直遇到这个问题。

Fatal error: Uncaught Error: Call to undefined function mb_detect_encoding() 
in C:Apache24htdocsphpmyadminlibrariesphp-gettextgettext.inc:177 Stack 
trace: #0 C:Apache24htdocsphpmyadminlibrariesphp-
gettextgettext.inc(282): _en code('The %s extensio...') #1 
C:Apache24htdocsphpmyadminlibrariesphp-gettextgettext.inc(289): _
gettext('The %s extensio...') #2 
C:Apache24htdocsphpmyadminlibrariescore.lib.php(306): __('The %s 
extensio...') #3 C:Apache24htdocsphpmyadminlibrariescore.lib.php(961): 
PMA_warnMissingExtension('mbstring', true) #4 
C:Apache24htdocsphpmyadminlibrariescommon.inc.php(102): 
PMA_checkExtensions() #5 C:Apache24htdocsphpmyadminindex.php(13): 
require_once('C:\Apache24\htd...') #6 {main} thrown in 
C:Apache24htdocsphpmyadminlibrariesphp-gettextgettext.inc on line 177

我已经多次通过并尝试了所有关于这个问题我能找到的建议并且尚未弄明白。我没有运气,尝试了各种“/”“”建议。

这是我的httpd.conf设置:

ServerRoot "c:/Apache24"


 </IfModule>
 LoadModule php7_module "c:/php/php7apache2_4.dll"
 AddHandler application/x-httpd-php .php
 PHPIniDir "c:PHP"

这是我的php.ini设置:

 ; Directory in which the loadable extensions (modules) reside.
 ; http://php.net/extension-dir
   extension_dir = "C:/PHP/ext"
 ; On windows:
   extension_dir = "C:/PHP/ext"   



 ;extension=php_bz2.dll
 ;extension=php_curl.dll
 ;extension=php_fileinfo.dll
 ;extension=php_ftp.dll
  extension=php_gd2.dll
  extension=php_gettext.dll
 ;extension=php_gmp.dll
 ;extension=php_intl.dll
 ;extension=php_imap.dll
 ;extension=php_interbase.dll
 ;extension=php_ldap.dll
  extension=php_mbstring.dll
  extension=php_exif.dll      ; Must be after mbstring as it depends on it
  extension=php_mysqli.dll
 ;extension=php_oci8_12c.dll  ; Use with Oracle Database 12c Instant Client
 ;extension=php_openssl.dll
 ;extension=php_pdo_firebird.dll
 ;extension=php_pdo_mysql.dll
 ;extension=php_pdo_oci.dll
 ;extension=php_pdo_odbc.dll
 ;extension=php_pdo_pgsql.dll
 ;extension=php_pdo_sqlite.dll
 ;extension=php_pgsql.dll
 ;extension=php_shmop.dll

PHPINFO

 PHP Version 7.0.13
 System Windows NT SERVER 6.3 build 9600 (Windows Server 2012 R2    
 Standard Edition) AMD64
 Build Date Nov 8 2016 13:28:54
 Compiler   MSVC14 (Visual C++ 2015)
 Architecture   x64
 Configure Command  cscript /nologo configure.js "--enable-snapshot-build"      
 "--enable-debug-pack" "--with-pdo-oci=c:php-  
 sdkoraclex64instantclient_12_1sdk,shared" "--with-oci8-12c=c:php-
 sdkoraclex64instantclient_12_1sdk,shared" "--enable-object-out-
 dir=../obj/" "--enable-com-dotnet=shared" "--with-mcrypt=static" "-- 
 without-analyzer" "--with-pgo"
 Server API Apache 2.0 Handler
 Virtual Directory Support  enabled
 Configuration File (php.ini) Path  C:Windows
 Loaded Configuration File  (none)
 Scan this dir for additional .ini files    (none)
 Additional .ini files parsed   (none)
 PHP API    20151012
 PHP Extension  20151012
 Zend Extension 320151012
 Zend Extension Build   API320151012,TS,VC14
 PHP Extension Build    API20151012,TS,VC14
 Debug Build    no
 Thread Safety  enabled
 Zend Signal Handling   disabled
 Zend Memory Manager    enabled
 Zend Multibyte Support disabled
 IPv6 Support   enabled
 DTrace Support disabled
 Registered PHP Streams php, file, glob, data, http, ftp, zip,      
 compress.zlib, phar
 Registered Stream Socket Transports    tcp, udp
 Registered Stream Filters  convert.iconv.*, mcrypt.*, mdecrypt.*,   
 string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*,  
 consumed, dechunk, zlib.*

软件/硬件

 - Windows Server 2016R2
 - PHP 7.0.13
 - Phpmyadmin (C:Apache24htdocsphpmyadmin)
 - Apache 2.4
 - MySQL 5.7.1

我感谢你能给我的任何帮助。不知道采取什么措施。

答案

我在使用Bitnami WAMP Stack版本7.0.12-0的Windows 10上遇到了同样的问题(不确定你是使用Bitnami还是其他一些WAMP堆栈,或者没有)。我放弃了故障排除(你试过运行命令:

cd php
deplister extphp_mbstring.dll

在命令提示符中,检查PHP_MBSTRING.DLL的依赖关系,看看是否有任何“NOTFOUND”错误?),并且刚刚安装了最新版本的Bitnami,7.0.13-1,然后phpMyAdmin立即工作。 (我在之前版本的Bitnami中稍微更改了我的httpd.conf和php.ini,所以我可能已经破坏了phpMyAdmin这些更改)。

另一答案

我有同样的问题,我只是在php.ini文件中更新完整的扩展文件夹路径

extension_dir = "C:/wamp/bin/php/php7.1.13/ext/"

并更新了最新的phpmyadmin版本,因为phpmyadmin4.1.14与php7不兼容。我希望它能解决你的问题

以上是关于PHPmyadmin问题 - 致命错误:未捕获错误:调用未定义函数mb_detect_encoding()的主要内容,如果未能解决你的问题,请参考以下文章

PHPmyadmin问题 - 致命错误:未捕获错误:调用未定义函数mb_detect_encoding()

phpMyAdmin 应用程序因“致命错误:未捕获的 ValueError:mysqli_result::data_seek()”而崩溃

致命错误:未捕获的错误:在 C:\xampp\phpMyAdmin\libraries\classes\DatabaseInterface.php:1544 中的 null 上调用成员函数存在()

突然出现Apache错误?致命错误:未捕获错误

phpMyAdmin 错误调用未定义函数

PhpMyAdmin 突然显示错误