phpMyAdmin 错误:缺少 mbstring 扩展。请检查您的 PHP 配置
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/30047169/
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
phpMyAdmin Error: The mbstring extension is missing. Please check your PHP configuration
提问by Klemen Rejec
I have a problem running phpMyAdmin. When I try to access phpMyAdmin in my browser, I get the error message: "The mbstring extension is missing. Please check your PHP configuration."
我在运行 phpMyAdmin 时遇到问题。当我尝试在浏览器中访问 phpMyAdmin 时,收到错误消息:“缺少 mbstring 扩展。请检查您的 PHP 配置。”
I have already searched on the internet for possible solutions. According to that, I made some modifications in php.ini file. I uncommented the line ";extension=php_mbstring.dll" and wrote the full path of the ext folder in extension_dir. Sadly, it still doesn't work.
我已经在互联网上搜索了可能的解决方案。据此,我在 php.ini 文件中做了一些修改。我取消了“;extension=php_mbstring.dll”这一行的注释,并在extension_dir 中写入了ext 文件夹的完整路径。可悲的是,它仍然不起作用。
Could you please help me finding the proper solution.
你能帮我找到合适的解决方案吗?
回答by Sameer
just run these command
只需运行这些命令
sudo apt-get install phpmyadmin php-mbstring php-gettext
sudo apt-get install phpmyadmin php-mbstring php-gettext
sudo service apache2 restart
sudo service apache2 restart
Or you can follow this post...
或者你可以关注这个帖子...
回答by hiHyman
I've solved my problem by this way: Edit the php.inifile:
我已经通过这种方式解决了我的问题:编辑php.ini文件:
- change extension_dir = "ext"into extension_dir = "D:\php\ext"(please write ur own path)
- change ;extension=php_mbstring.dllinto extension=php_mbstring.dll(delete the ";")
- Then just save your php.ini file and copy it to ur Windows directory。(“C:\Windows“)
- restart the apache server。
- 将extension_dir = "ext"改成extension_dir = "D:\php\ext"(请写你自己的路径)
- 将;extension=php_mbstring.dll改成extension=php_mbstring.dll(去掉“;”)
- 然后只需保存您的 php.ini 文件并将其复制到您的 Windows 目录。 (“C:\Windows“)
- 重启apache服务器。
The above is my solution,Hope it will work for u.
以上是我的解决方案,希望它对你有用。
回答by Suraj
If you are ubuntu 14.04 and using php 5.6 You are missing out on mbstring and mysql module
如果您使用的是 ubuntu 14.04 并使用 php 5.6,您将错过 mbstring 和 mysql 模块
Please install mbstring and mysql by
请通过以下方式安装 mbstring 和 mysql
sudo apt-get install php5.6-mbstring
sudo apt-get install php5.6-mysql
and restart apache
并重新启动apache
sudo service apache2 restart
回答by Arash Rabiee
It could happen after you update your php version, for instance if you upgrade from php5.6 to php7.1 you need to run these commands:
更新 php 版本后可能会发生这种情况,例如,如果您从 php5.6 升级到 php7.1,则需要运行以下命令:
sudo apt-get install php7.1-mbstring
sudo service apache2 restart
If your destination version is different you need to check if the mbstring package exsit or not, an example for php7.0:
如果您的目标版本不同,您需要检查 mbstring 包是否存在,以 php7.0 为例:
sudo apt-cache search php7.0-mbstring
I found it useful to first check existence of all modules that you working with, then performing an upgrade, in addition to that update phpmyadmin after upgrading your php is a good idea
我发现首先检查您使用的所有模块是否存在很有用,然后执行升级,除了在升级您的 php 之后更新 phpmyadmin 是一个好主意
回答by Ahmed Ali
In my case i made a new installation of php7 using xampp, the error was in php.ini at line 699, i just did
在我的情况下,我使用 xampp 重新安装了 php7,错误在 php.ini 的第 699 行,我刚刚做了
include_path= C:\Program Files (x86)\xampp\php\PEAR
include_path= C:\Program Files (x86)\xampp\php\PEAR
to
到
include_path= "C:\Program Files (x86)\xampp\php\PEAR"
include_path= "C:\Program Files (x86)\xampp\php\PEAR"
and it worked for me.
它对我有用。
I checked this by running the php.exe it gave me that error and i fixed it.
我通过运行 php.exe 来检查它,它给了我那个错误,我修复了它。
回答by W92
Change extension_dir = "ext"
to extension_dir = "C:/php/ext"
in php.ini
.
更改extension_dir = "ext"
到extension_dir = "C:/php/ext"
在php.ini
。
回答by Mohammed Khan
I have solved my problem by this way:
我已经通过这种方式解决了我的问题:
Edit the c:\php\php.ini file:
change extension_dir = "ext" into extension_dir = "c:\php\ext" (please write
ur own path)- change ;extension=php_mbstring.dll into extension=php_mbstring.dll (delete
the ";") - restart the apache server。
编辑 c:\php\php.ini 文件:
将 extension_dir = "ext" 改成 extension_dir = "c:\php\ext" (请写你
自己的路径)- 将 ;extension=php_mbstring.dll 改成 extension=php_mbstring.dll (去掉
“;”) - 重启apache服务器。
I Hope it will work for u.
我希望它对你有用。
回答by Durodola Opemipo
This worked for me on Kali-linux 2018 :
这在 Kali-linux 2018 上对我有用:
apt-get install php7.0-mbstring
service apache2 restart
回答by Mourad MAMASSI
You can try this
你可以试试这个
sudo apt-get install phpmyadmin php-mbstring php-gettext
sudo ln -s /usr/share/phpmyadmin/ /var/www/html/phpmyadmin
service apache2 restart
回答by Jakab Molnár
You also need to define PHPIniDir
- c:/php_install_path
您还需要定义PHPIniDir
-c:/php_install_path