安装php mbstring extension,PHP安装mbstring扩展

方法一:

如果运行phpMyAdmin发现如下错误:

The mbstring PHP extension was not found and you seem to be using a multibyte charset. Without the mbstring extension phpMyAdmin is unable to split strings correctly and it may result in unexpected results.

是因为没有mbstring扩展所致,解决方法如下

在SSH登录LINUX后执行以下命令:

1.执行

yum install php-mbstring

2. 修改php.ini (这一步非常重要, 部分lxadmin版本无法自动修改)

echo ‘extension=mbstring.so’ >>/etc/php.ini #更具php安装目录而定

3. 重启web service

如果是apache: service httpd restart

方法二:

php 5.36

安装目录:/usr/local/php

cd /usr/src/php-5.3.6/ext/mbstring

/usr/local/php/bin/phpize #create makefiles

./configure --with-php-config=/usr/local/php/bin/php-config

make && make install

echo ‘extension=mbstring.so’ >>/usr/local/php/php.ini

service httpd reload

使用/usr/local/php/bin/php -v #查看配置是否错误

使用php.info查看mbstring是否安装成功

出现如下图则表明安装成功。

Multibyte Support

enabled

Multibyte string engine

libmbfl

HTTP input encoding translation

disabled

mbstring extension makes use of "streamable kanji code filter and converter", which is distributed under the GNU Lesser General Public License version 2.1.

Multibyte (japanese) regex support

enabled

Multibyte regex (oniguruma) backtrack check

On

Multibyte regex (oniguruma) version

4.7.1

Directive

Local Value

Master Value

mbstring.detect_order

no value

no value

mbstring.encoding_translation

Off

Off

mbstring.func_overload

0

0

mbstring.http_input

pass

pass

mbstring.http_output

pass

pass

mbstring.http_output_conv_mimetypes

^(text/|application/xhtml\+xml)

^(text/|application/xhtml\+xml)

mbstring.internal_encoding

no value

no value

mbstring.language

neutral

neutral

mbstring.strict_detection

Off

Off

mbstring.substitute_character

no value

no value

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值