php phpMyAdmin mbstring 错误

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/18599406/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-25 17:53:34  来源:igfitidea点击:

phpMyAdmin mbstring error

phpphpmyadminmbstring

提问by user1930852

Whenever I try to enter my phpMyAdmin, it gives me this error:

每当我尝试输入我的 phpMyAdmin 时,它都会给我这个错误:

The mbstring extension is missing. Please check your PHP configuration.

I've looked all over the Internet for a fix, but all I've found is errors similar to mine, but not the same, or the exact same but there was no fix given.

我在 Internet 上到处寻找修复程序,但我发现的所有错误都与我的相似,但不相同,或者完全相同但没有给出修复程序。

I am also using Windows.

我也在使用 Windows。

回答by Arjang

In Centos I have installed a php extension. I did this with:

在 Centos 中,我安装了一个 php 扩展。我这样做了:

yum install php-mbstring

回答by PHP Mentor

Before sometime I also had the same problem. I have tried replacing the .dllfile but no result. After some debugging I found the solution.

以前我也遇到过同样的问题。我试过替换.dll文件,但没有结果。经过一些调试,我找到了解决方案。

I had this in my php.inifile:

我的php.ini文件中有这个:

extension_dir = "ext"

extension_dir = "ext"

And I'm getting mbstring extension missingerror. So I tried putting the full path for the extension directory and it works for me. like:

我收到mbstring extension missing错误。所以我尝试为扩展目录添加完整路径,它对我有用。喜欢:

extension_dir = "C:\php\ext"

extension_dir = "C:\php\ext"

Hope this will help.

希望这会有所帮助。

Cheers,

干杯,

回答by cptnk

check your php.ini file in the root directory of your php installation. In the extensions part of the configuration you should find:

检查您的php安装根目录中的php.ini文件。在配置的扩展部分,您应该找到:

;extension=php_mbstring.dll

remove the leading ';' to uncomment and enable the extension so it looks like this:

删除前导';' 取消注释并启用扩展,使其看起来像这样:

extension=php_mbstring.dll

restart your apache and it should work.

重新启动您的 apache,它应该可以工作。

Edit: I just read that you are already using a webhost. Does your webhost have a interface where you can set php variables etc? Or a .ini file you can edit?

编辑:我刚刚读到您已经在使用虚拟主机。您的虚拟主机是否有可以设置 php 变量等的界面?或者您可以编辑的 .ini 文件?

If not you may are forced to talk to the webhost and ask them to enable that particular extension.

如果没有,您可能被迫与网络主机交谈并要求他们启用该特定扩展。

回答by user2651478

My case was like this

我的情况是这样的

Strangely, I noticed that the php.ini file that WAMP was using wasn't the one in the php directory, but rather was referencing a php.ini file in the bin directory... I copied my php.ini file to wamp\bin\apache\apache2.4.17\bin directory, restarted the wamp services and PHPMyadmin was off and running...

奇怪的是,我注意到 WAMP 使用的 php.ini 文件不是 php 目录中的文件,而是引用了 bin 目录中的 php.ini 文件......我将我的 php.ini 文件复制到 wamp\ bin\apache\apache2.4.17\bin 目录,重启wamp服务,PHPMyadmin关闭运行...

Thanks I solved the problem

谢谢我解决了问题

回答by Fatih ?elik

Another reason for this problem is Php version. When I changed the running PHP version to 7.0.0, problem has gone.

这个问题的另一个原因是 PHP 版本。当我将正在运行的 PHP 版本更改为 7.0.0 时,问题就消失了。

enter image description here

在此处输入图片说明

回答by Rick Sanchez

In Ubuntu Server I have installed a php extension. I did this with:

在 Ubuntu Server 中,我安装了一个 php 扩展。我这样做了:

sudo apt-get install php-mbstring

回答by Annapurna

  1. install mbstring and restart your apache:

    sudo apt-get install php-mbstring
    sudo service apache restart
    
  1. 安装 mbstring 并重新启动您的 apache:

    sudo apt-get install php-mbstring
    sudo service apache restart
    

then remove ; from your php.ini file:

然后删除; 从你的 php.ini 文件:

;extension=php_mbstring.dll

to

extension=php_mbstring.dll

If it still doesn't work..remove your php setup, without removing the databases from your phpmyadmin. Reinstall it.

如果它仍然不起作用..删除您的 php 设置,而不从您的 phpmyadmin 中删除数据库。重新安装它。

NB: * if you want to remove all, all mention the one you need to.

注意:*如果你想全部删除,都提到你需要的那个。

sudo apt-get remove php* 

Then install the php and modules of the php version that you need. here, php 7.1:

然后安装你需要的php版本的php和模块。在这里,php 7.1:

sudo apt-get install php7.1 php7.1-cli php7.1-common libapache2-mod-php7.1 php7.1-mysql php7.1-fpm php7.1-curl php7.1-gd php7.1-bz2 php7.1-mcrypt php7.1-json php7.1-tidy php7.1-mbstring php-redis php-memcached

restart your apache and check the php version.

重新启动您的 apache 并检查 php 版本。

sudo service apache restart
php -v

when all this is done, execute the following command to enable mbstring forcefully and restart your apache.

完成所有这些后,执行以下命令以强制启用 mbstring 并重新启动 apache。

sudo phpenmod mbstring
sudo service apache restart

Hope it helps. It did to me :)

希望能帮助到你。它对我有用:)

回答by user3759454

Using xampp, this will work (php7 has been extracted to the xampp\php directory):

使用 xampp,这将起作用(php7 已解压缩到 xampp\php 目录):

Make the following changes in the php.ini:

在 php.ini 中进行以下更改:

  1. uncommend (remove the ;)
  1. 取消推荐(删除;)

;extension=php_mbstring.dll

;扩展= p​​hp_mbstring.dll

  1. uncommend (remove the ;)
  1. 取消推荐(删除;)

;extension=php_mysqli.dll

;扩展名=php_mysqli.dll

  1. set the path to the extention Directory
  1. 设置扩展目录的路径

extension_dir = "ext"

extension_dir = "ext"

to the full path, for example:

到完整路径,例如:

extension_dir = "C:\xammp\php\ext"

extension_dir = "C:\xampp\php\ext"

Additional, change the xampp-settings in the httpd-xampp.conf:

另外,更改 httpd-xampp.conf 中的 xampp-settings:

  1. change
  1. 改变

LoadFile "C:/xampp/php/php5ts.dll"

加载文件“C:/xampp/php/php5ts.dll”

to

LoadFile "C:/xampp/php/php7ts.dll"

加载文件“C:/xampp/php/php7ts.dll”

  1. change
  1. 改变

LoadModule php5_module "C:/xampp/php/php5apache2_4.dll"

LoadModule php5_module "C:/xampp/php/php5apache2_4.dll"

to

LoadModule php7_module "C:/xampp/php/php7apache2_4.dll"

LoadModule php7_module "C:/xampp/php/php7apache2_4.dll"

  1. change all appearance (3 times) of
  1. 改变所有外观(3次)

IfModule php5_module

IfModule php5_module

to

IfModule php7_module

IfModule php7_module

That's it.

就是这样。

回答by Vital Rulinski

Ubuntu 15.10

Ubuntu 15.10

1) sudo nano /etc/php/7.0/apache2/php.ini

1)须藤纳米 /etc/php/7.0/apache2/php.ini

uncommited extension=php_mbstring.dll

未提交的扩展=php_mbstring.dll

2) sudo apt-get install php7.0-mbstring

2) sudo apt-get install php7.0-mbstring

3) restart apache2

3)重启apache2

回答by Travis Heeter

I just installed WAMP 3 on Windows 10 and had this issue.

我刚刚在 Windows 10 上安装了 WAMP 3 并遇到了这个问题。

I had to go to C:\wamp64\bin\php\php7.0.0\and copy the php.inifile to C:\wamp64\bin\apache\apache2.4.17\bin\

我不得不去C:\wamp64\bin\php\php7.0.0\并将php.ini文件复制到C:\wamp64\bin\apache\apache2.4.17\bin\

Then I restarted WAMP, and was finally able to access my phpMyAdmin file.

然后我重新启动 WAMP,终于能够访问我的 phpMyAdmin 文件。

Note: this is probably not the correct way to do this because now there are 2 php.ini files. There is probably a setting in an Apache file that points to the php.ini file, but I haven't seen that yet. I will update this if I find it.

注意:这可能不是正确的方法,因为现在有 2 个 php.ini 文件。Apache 文件中可能有一个指向 php.ini 文件的设置,但我还没有看到。如果我找到它,我会更新它。