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

 



 

相关文章:

  • 2021-10-25
  • 2021-08-04
  • 2022-01-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-24
  • 2022-12-23
猜你喜欢
  • 2021-10-09
  • 2022-12-23
  • 2022-12-23
  • 2021-07-01
  • 2021-04-14
  • 2022-12-23
相关资源
相似解决方案