简体   繁体   English

phpMyAdmin无法看到的mbstring扩展名

[英]The mbstring extension not seen by phpMyAdmin

I know there has been a lot of questions about this, but they didn't helped me to solve my problem. 我知道对此有很多疑问,但是它们并没有帮助我解决我的问题。

I get this error when trying to access phpMyAdmin: 尝试访问phpMyAdmin时出现此错误:

phpMyAdmin - Error

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

I am running php7.0 - in php.ini located in etc/php/7.0/apache2 I have this: 我正在运行php7.0-位于etc/php/7.0/apache2中的php.ini中,我有这个:

extension_dir = "./"
extension_dir = "mods-available"

uncomented. 没来。 I've also tried 我也尝试过

extension_dir = "./"
extension_dir = "ext"

but it didn't work and I don't have any "ext" directory in etc/php/7.0/ so it doesnt make any sense to have it there right? 但是它没有用,在etc/php/7.0/我没有任何"ext"目录,所以在那里正确安装它没有任何意义? Anyway I tried both options and I tried restarting apache after setting either one of them, but nothing works. 无论如何,我都尝试了这两个选项,并在设置了其中一个选项后尝试重新启动apache,但没有任何效果。

Furthermore when running 此外,跑步时

sudo apt-get install php7.0-mbstring

I get output: 我得到输出:

php7.0-mbstring is already the newest version (7.0.4-7ubuntu2.1).
php7.0-mbstring set to manually installed.

which means it's already installed right? 这意味着它已经安装正确了吗? If I ls the directory etc/php/7.0/mods-available I can see file called mbstring.ini which I suppose is the proof it's installed. 如果我ls目录etc/php/7.0/mods-available我可以看到文件名为mbstring.ini我估计是它的安装证明。 But when trying to access phpMyAdmin it still says that mbstring is missing. 但是,当尝试访问phpMyAdmin时,它仍然说缺少mbstring。

Any ideas? 有任何想法吗?

Your question is all over the place so let me start from scratch: 您的问题无处不在,所以让我从头开始:

  1. Run phpinfo(); 运行phpinfo(); from a test file and check out the extension_dir 从测试文件中检查出extension_dir
  2. Does the extension_dir point to the right place? extension_dir是否指向正确的位置? Yes, great! 对,很好! No, fix it. 不,解决它。
  3. Does the extension exist in extension_dir ? 扩展名是否存在于extension_dir Yes, nice. 是好。 No, add the extension. 不,添加扩展名。

Also, why do you have: 另外,您为什么有:

extension_dir = "./"
extension_dir = "mods-available"

Did you need this instead? 您是否需要这个?

extension_dir = "./mods-available"

It might be worth trying a full path like I use on my Windows machine: 可能值得尝试像在Windows计算机上使用的完整路径:

extension_dir = "C:\\PHP\\x86\\7.0.2\\ext"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM