在PHP中启用mbstring扩展:未定义符号:未知,第0行的Compiler_globals

时间:2018-10-09 06:51:01

标签: php ubuntu mbstring

我有PHP 7.1.9(从源代码编译)和mbstring:php7.1-mbstring已经是最新版本(7.1.17-0ubuntu0.17.10.1)。我在php.ini中添加了extension_dir和extension = mbstring.so。我收到消息警告:PHP启动:无法加载动态库'/usr/lib/php/20160303/mbstring.so'-/usr/lib/php/20160303/mbstring.so:未定义符号:未知行上的compiler_globals在第0行

任何人都可以建议正在发生的事情..我对php,MBstring和OS(ubuntu 16.04)的版本有些困惑

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/mbstring.so' - /usr/lib/php/20151012/mbstring.so: undefined symbol: compiler_globals in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/mbstring.so' - /usr/lib/php/20151012/mbstring.so: undefined symbol: compiler_globals in Unknown on line 0
[PHP Modules]
Core
ctype
date
dom
fileinfo
filter
hash
iconv
json
libxml
mysqli
mysqlnd
pcre
PDO
pdo_sqlite
Phar
posix
Reflection
session
SimpleXML
SPL
sqlite3
standard
tokenizer
xml
xmlreader
xmlwriter
Zend OPcache

[Zend Modules]
Zend OPcache

php -i | grep php.ini

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012                                                                                        /php7.0-mbstring.so' - /usr/lib/php/20151012/php7.0-mbstring.so: undefined symbo                                                                                        l: compiler_globals in Unknown on line 0
Configuration File (php.ini) Path => /usr/local/lib
Loaded Configuration File => /usr/local/lib/php.ini

[mbstring]

extension=mbstring.so

extension_dir = /usr/lib/php/20151012

1 个答案:

答案 0 :(得分:0)

您可以尝试这些命令吗?

php -v

然后

php -i | grep php\.ini

只知道您是否在编辑正确的php.ini文件。您是否将apache用作您的Web服务器?您是否启用了apache的php扩展?