phpMyAdmin - 错误 | 缺少 mbstring 扩展名。请检查您在 Ubuntu 14.04 LTS 中的 PHP 配置
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/35931418/
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 in Ubuntu 14.04 LTS
提问by Doo Doo
I am using Ubuntu OS 14.04 LTS. After I run sudo apt-get dist-upgrade(run this command because I unable to download and update it when the os ask me) I cannot open phpmyadmin again. Before that I can open it normally.
我正在使用 Ubuntu 操作系统 14.04 LTS。在我运行sudo apt-get dist-upgrade(运行此命令,因为当操作系统询问我时我无法下载和更新它)后,我无法再次打开 phpmyadmin。在此之前我可以正常打开它。
I am using PHP Version 7.0.4-5, phpmyadmin 4.5.5.1With phpmyadmin I downloaded it from https://www.phpmyadmin.net/and then move to /var/www/html.
我使用的是PHP 版本 7.0.4-5, phpmyadmin 4.5.5.1使用 phpmyadmin 我从https://www.phpmyadmin.net/下载它,然后移动到/var/www/html。
I have enabled
我已启用
extension=php_mbstring.dll
extension=php_exif.dll
extension=php_mysqli.dll
and restart apache2 still not work. And when I run php-mand phpinfo() also cannot find mbstring.
并重新启动 apache2 仍然无法正常工作。当我运行php-m和 phpinfo() 也找不到mbstring。
Please help solve this problem. Really thankful for help me.
请帮助解决这个问题。真的很感谢帮助我。
回答by Doo Doo
Yey :) I have solved it!!!! Just run this
是的:) 我已经解决了!!!!只需运行这个
sudo apt-get install libapache2-mod-php7.0
sudo apt-get install php7.0-mbstring
and then sudo service apache2 restart
.
然后sudo service apache2 restart
。
回答by demenvil
I solved with :
我解决了:
sudo apt-get install libapache2-mod-php7.*
sudo apt-get install php7.*-mbstring
and then -
进而 -
sudo service apache2 restart
回答by Saeed Mohtasham
I solved it by these commands :
我通过这些命令解决了它:
sudo apt-get install php-mbstring
sudo apt-get install php-gettext
回答by Ravindra Bhalothia
First of all as you're using Ubuntu, it supports .so files windows has .dll files
首先,当您使用 Ubuntu 时,它支持 .so 文件 Windows 具有 .dll 文件
Open terminal and try installing below :
打开终端并尝试在下面安装:
sudo apt-get install libapache2-mod-php7.0
回答by Roman
Nothing worked for me but the following. After I tried all methods, I ran Synaptic Package Manager program and manually forced to install all programs with names beginning from (all versions of):
没有什么对我有用,但以下内容。在我尝试了所有方法后,我运行了 Synaptic Package Manager 程序并手动强制安装所有名称以(所有版本)开头的程序:
- mcrypt
- mbstring
- 加密
- 字符串
Then I restarted apache2 in the terminal by
然后我在终端中重新启动了 apache2
sudo systemctl restart apache2
and that's it: phpMyAdmin works after these steps.
就是这样:phpMyAdmin 在这些步骤之后工作。
回答by Ajit Rajbhar
I am using CentOS release 6.9 (Final) tried 1.yum install php-mbstring 2.yum install php-gettext 3.service httpd restart and working fine now
我正在使用 CentOS 6.9 版(最终版)尝试 1.yum install php-mbstring 2.yum install php-gettext 3.service httpd restart 并且现在工作正常
回答by Silicon Star
I initially tried to use sudo apt-get install phpmyadmin php-mbstring php-gettext
however this returned an error where it automatically aborted, (which maybe linked to my available memory on a Raspberry pi 3 B+).
我最初尝试使用sudo apt-get install phpmyadmin php-mbstring php-gettext
但是这会返回一个错误,它会自动中止(这可能与我在 Raspberry pi 3 B+ 上的可用内存有关)。
Instead I ran sudo apt-get install php7.1-mbstring
(note to amend code with your php version. If unsure first check this via; php --version
). This should now setup and create config file.
相反,我跑了sudo apt-get install php7.1-mbstring
(注意用你的 php 版本修改代码。如果不确定,请先检查这个;php --version
)。现在应该设置并创建配置文件。
Finally run; sudo service apache2 restart. Reload web address and you should have access to php admin.
最后运行;须藤服务 apache2 重启。重新加载网址,您应该可以访问php admin。
Although in some instances you may incur a follow up error; "mysqli extension is missing".
尽管在某些情况下您可能会遇到后续错误;“缺少 mysqli 扩展”。
In this case type; sudo apt-get install php7.1-mysql
and then; sudo service apache2 restart
and.....NOW you should have access to phpadmin.
在这种情况下类型; sudo apt-get install php7.1-mysql
进而; sudo service apache2 restart
并且.....现在您应该可以访问 phpadmin。
回答by user2517728
I also have this problem. I reconfigure phpmyadmin and install php7.0 modules. I post my solution on this post: https://askubuntu.com/a/764254/212315
我也有这个问题。我重新配置了 phpmyadmin 并安装了 php7.0 模块。我在这个帖子上发布了我的解决方案:https: //askubuntu.com/a/764254/212315