0

I have PHP 7.1.9 (compiled from source) and mbstring: php7.1-mbstring is already the newest version (7.1.17-0ubuntu0.17.10.1). I have added extension_dir and extension=mbstring.so in php.ini. I get message Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/mbstring.so' - /usr/lib/php/20160303/mbstring.so: undefined symbol: compiler_globals in Unknown on line 0

Can anyone suggest what is happening .. I'm a little confused with the versions of php, MBstring and 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
Martin
  • 13
  • 5

1 Answers1

0

Can you try these commands?

php -v

then

php -i | grep php\.ini

Just to know if you're editing the right php.ini file. Do you use apache as your web server? have you enabled apache's php extensions?

Alpe89
  • 299
  • 2
  • 11
  • yes, i am editing right file - /usr/local/lib/php.ini I use apache and it was compiled from source also, but no additional extensions for apache have been installed since – Martin Oct 09 '18 at 08:32
  • I also tried to install php7.0-mbstring, but the error is exactly the same – Martin Oct 09 '18 at 08:34
  • can you try to use as the extension's name instead of mbstring.so php7.1-mbstring.so? – Alpe89 Oct 09 '18 at 09:18
  • I meant that I changed the name of the extension as php7.1-mbstring.so and I changed the name in php.ini, but result is the same – Martin Oct 09 '18 at 11:49
  • can you post your output of php -m, php -i | grep php\.ini, and your php.ini file (just the extensions section) – Alpe89 Oct 09 '18 at 12:48
  • I put only two lines from php.ini because I left other lines unchanged – Martin Oct 09 '18 at 14:43
  • I noticed `Scan this dir for additional .ini files (none)` line in phpinfo(). Maybe, as a result, the mbstring.ini settings are not read. – Martin Oct 10 '18 at 10:57
  • in the output of php -m it does not list mbstring, have you installed it with the package manager? – Alpe89 Oct 10 '18 at 14:03
  • Extension was installed with the package manager. The day before I installed in a similar way OPcache and it was no problem. – Martin Oct 10 '18 at 18:41