gpt4 book ai didi

PHP:调用未定义的函数 mb_strlen() - 在启用了 mbstring 的自定义编译的 PHP 上

转载 作者:可可西里 更新时间:2023-11-01 12:57:12 26 4
gpt4 key购买 nike

我有这个自定义编译的 PHP (v5.3.3),启用了以下扩展(通过配置):

./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 已启用: alt text

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

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

谁能解释为什么会发生这种情况以及如何解决这个问题?

谢谢,m^e

最佳答案

For PHP 4.3.3 or before, To enable that feature, you will have to supply either one of the following options to the LANG parameter of --enable-mbstring=LANG ; --enable-mbstring=cn for Simplified Chinese support, --enable-mbstring=tw for Traditional Chinese support, --enable-mbstring=kr for Korean support, --enable-mbstring=ru for Russian support, and --enable-mbstring=ja for Japanese support (default). To enable all supported encoding, use --enable-mbstring=all

尝试

  • 再次配置--enable-mbstring only

  • grep mb_strlen $PATH_TO_YOUR_PHP_BINARY 查看是否存在

关于PHP:调用未定义的函数 mb_strlen() - 在启用了 mbstring 的自定义编译的 PHP 上,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4203730/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com