PHP:调用未定义函数mb_strlen()-在启用了mbstring的自定义编译PHP上 [英] PHP: Call to undefined function mb_strlen() - on custom compiled PHP with mbstring enabled

查看:328
本文介绍了PHP:调用未定义函数mb_strlen()-在启用了mbstring的自定义编译PHP上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将此自定义编译的PHP(v5.3.3)启用了以下扩展名(通过configure):

I have this custom compiled PHP (v5.3.3) with the following extensions enabled (via configure):

./configure 
--prefix=/usr/local/php5.3.3 
--with-config-file-path=/usr/local/apache2/conf 
--with-apxs2=/usr/local/apache2/bin/apxs 
--with-bz2 
--with-curl=/usr/lib 
--with-curlwrappers 
--with-freetype-dir=/usr/local 
--with-gd=/usr/local 
--with-gettext 
--with-gmp 
--with-iconv=/usr/local 
--with-imap=/usr/local/imap2007e 
--with-imap-ssl 
--with-jpeg-dir=/usr/local/lib 
--with-kerberos 
--with-libxml-dir=/usr/lib 
--with-mcrypt=/usr/local 
--with-mhash 
--with-mysql=/usr/lib/mysql 
--with-mysql-sock=/var/lib/mysql/mysql.sock 
--with-mysqli=/usr/lib/mysql/mysql_config 
--with-openssl=/usr 
--with-pcre-dir=/usr/local/lib 
--with-pear 
--with-png-dir=/usr/local/lib 
--with-readline 
--with-sqlite 
--with-xmlrpc 
--with-xsl=/usr/local 
--with-zlib-dir=/usr/local/lib 
--with-zlib=/usr/local 
--without-pgsql 
--enable-bcmath 
--enable-calendar 
--enable-exif 
--enable-embedded-mysqli=shared 
--enable-ftp 
--enable-gd-jis-conv 
--enable-gd-native-ttf 
--enable-mbstring=all 
--enable-mbregex 
--enable-shared 
--enable-sockets 
--enable-soap 
--enable-sqlite-utf8 
--enable-zend-multibyte 
--enable-zip 
--disable-pdo 
--disable-phar 

phpinfo()明确指出已启用mbstring:

phpinfo() clearly states that mbstring is enabled:

有趣的是,当我尝试运行一些PHP脚本(SugarCRM更新)时,它报告以下错误:

Funny thing is when I try to run some PHP scripts (SugarCRM updates), it reports the following error:

PHP致命错误:在第4165行的crm/include/pclzip/pclzip.lib.php中调用未定义的函数mb_strlen()

PHP Fatal error: Call to undefined function mb_strlen() in crm/include/pclzip/pclzip.lib.php on line 4165

任何人都可以向我们解释为什么会发生这种情况以及如何解决此问题吗?

Can anyone throw some light into WHY this is happening and how to fix this?

谢谢, m ^ e

推荐答案

在具有PHP和Apache的Windows系统上,我必须修改PHP.INI文件,使其包含以下行:

On my Windows system with PHP and Apache, I had to modify the PHP.INI file so that it includes the following line:

extension=php_mbstring.dll

(在主[PHP]部分中)并重新启动Apache.之后,对mb_strlen的调用确实成功了.

(inside the main [PHP] section) and restart Apache. After that, the call to mb_strlen did succeed.

这篇关于PHP:调用未定义函数mb_strlen()-在启用了mbstring的自定义编译PHP上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆