[英]Phpmyadmin showing mbstring is missing
I have using PHP 7.2
version,and modules list is given below:我使用
PHP 7.2
版本,模块列表如下:
php -m
[PHP Modules]
bz2
Core
ctype
curl
date
dom
exif
fileinfo
filter
gd
gettext
hash
iconv
intl
json
libxml
mbstring
mcrypt
openssl
pcntl
pcre
PDO
Phar
Reflection
session
SimpleXML
soap
sodium
SPL
standard
tokenizer
xml
xmlreader
xmlwriter
zip
zlib
[Zend Modules]
In this list it shows mbstring
but in info.php
on browser it doesn't has mbstring
when i searched...anyone please help me for this issue.在此列表中,它显示
mbstring
,但在浏览器上的info.php
中,当我搜索时它没有mbstring
...任何人请帮我解决这个问题。
Thanks in advance.提前致谢。
The cli
and apache
or nginx
module have different config paths and, probably, different configs. cli
和apache
或nginx
模块具有不同的配置路径,并且可能具有不同的配置。 Your module is enabled on cli
but disabled to web
.您的模块在
cli
上启用但对web
禁用。
You need to check your php.ini
您需要检查您的
php.ini
If you try to do this (on terminal):如果您尝试这样做(在终端上):
$ php -a
phpinfo();
In a point you can see the php.ini
path.在某一点上,您可以看到
php.ini
路径。
Do the same thing on your www
directory creating a phpinfo.php
and calling the phpinfo()
function and check the php.ini
path.在您的
www
目录上执行相同的操作,创建phpinfo.php
并调用phpinfo()
function 并检查php.ini
路径。
Probably is not the same path and not the same configurations because we have a ini
file to cli
and to the apache/nginx
module.可能不是相同的路径和不同的配置,因为我们有一个用于
cli
和apache/nginx
模块的ini
文件。 So, you can fix it seeing which file is loading the modules and point to enable the module on web.因此,您可以修复它,查看哪个文件正在加载模块并指向启用 web 上的模块。
If is in different path, probably you'll need to enable or install the mbstring
module on web version.如果在不同的路径中,您可能需要在 web 版本上启用或安装
mbstring
模块。
Considering that you're using php-fpm
you can install mbstring
module with the following command:考虑到您使用的是
php-fpm
,您可以使用以下命令安装mbstring
模块:
php-fpm install mbstring
In case of Windows ,在Windows的情况下,
php.ini
filephp.ini
文件extension_dir = "ext" to extension_dir = "C:\php\ext"
(may vary based on your system) extension_dir = "ext" to extension_dir = "C:\php\ext"
(可能因您的系统而异)semicolon
from ;extension=php_mbstring.dll
and change it to extension=php_mbstring.dll
;extension=php_mbstring.dll
中删除semicolon
并将其更改为extension=php_mbstring.dll
;extension=php_mcrypt.dll
.;extension=php_mcrypt.dll
取消注释/删除分号来启用 mcrypt。 (Generally phpmyadmin also gives error for mcrypt
) mcrypt
错误)For ubuntu ,对于ubuntu ,
sudo apt-get install php-mbstring php7.0-mbstring php-gettext libapache2-mod-php7.0
sudo apt-get install php-mbstring php7.0-mbstring php-gettext libapache2-mod-php7.0
sudo systemctl restart apache2
sudo systemctl restart apache2
If above method doesn't work, explicitly enable mbstring and mcrypt extensions:如果上述方法不起作用,请显式启用 mbstring 和 mcrypt 扩展:
sudo phpenmod mcrypt
sudo phpenmod mbstring
sudo systemctl restart apache2
Hope it works for you!!希望这对你有用!!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.