从源码编译安装php,重新编译php,configure参数中加入 –enable-mbstring,如下所示,
./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql\
--with-apxs=/usr/local/apache/bin/apxs --with-config-file-path=/usr/local/apache/conf --enable-mbstring
[注] 其它configure参数按你的php相关路径进行配置
redhat/centOS/fedora系列使用yum在线安装
sudo yum install php-mbstring sudo /sbin/service httpd restart
Mac下可以如下进行
sudo port install php5-mbstring apachectl restart