PHP-问题处理Fatal error: Uncaught Error: Call to undefined function mb_strlen()

1.问题

  今天重新安装了ubuntu,PHP,MySQL,Apache,到测试CMS项目时发生一个错误:

  Fatal error: Uncaught Error: Call to undefined function mb_strlen()

 

 

2.解决:

  2.1 修改php.ini配置文件:

;extension=php_mbstring.dll

 找到上面的行,并去掉行开头的分号,来启用php_mbstring.dll

extension=php_mbstring.dll

  2.3重启apache服务:

sudo service apache2 restart

  2.4 检查php是否能否加载php_mbstring.dll

php -m

如果列表中没有mbstring,说明php_mbstring组件还没安装,需要安装php_mbstring。

  2.5 安装php_mbstring

sudo apt-get install php-mbstring 

  2.6 重启apache服务:

sudo service apache2 restart

 



 

posted @ 2017-02-11 22:52  ok_008  阅读(3851)  评论(0编辑  收藏  举报
给我写信