在Linux环境下给php添加mbstring扩展

LAMP安装禅道的时候提示:

MBSTRING扩展未加载

查看PHP版本

# php -v

[root@chandao ~]# php -v
PHP Warning:  Module 'mbstring' already loaded in Unknown on line 0
PHP 5.4.16 (cli) (built: Oct 30 2018 19:30:51)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies

 安装

# yum install php-mbstring -y

[root@chandao ~]# yum install php-mbstring -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package php-mbstring.x86_64 0:5.4.16-46.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================================================================================================================================
 Package                                               Arch                                            Version                                                 Repository                                      Size
====================================================================================================================================================================================================================
Installing:
 php-mbstring                                          x86_64                                          5.4.16-46.el7                                           local                                          505 k

Transaction Summary
====================================================================================================================================================================================================================
Install  1 Package

Total download size: 505 k
Installed size: 1.3 M
Downloading packages:
php-mbstring-5.4.16-46.el7.x86_64.rpm                                                                                                                                                        | 505 kB  00:00:01
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : php-mbstring-5.4.16-46.el7.x86_64                                                                                                                                                                1/1
  Verifying  : php-mbstring-5.4.16-46.el7.x86_64                                                                                                                                                                1/1

Installed:
  php-mbstring.x86_64 0:5.4.16-46.el7

Complete!

修改php.ini文件

# vi /etc/php.ini

在最后一行添加如下内容

extension=mbstring.so

重启Apache服务

# systemctl restart httpd

参考文章:

https://www.php.cn/php-weizijiaocheng-297010.html

转载于:https://www.cnblogs.com/djlsunshine/p/11224667.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值