0

For some reason, I can install pretty much any PHP extension, except for mbstring. I have installed php7.1.14 via sudo apt-get install php7.1 and then installed all my required extensions with sudo apt-get install php7.1-mysql php7.1-json... etc. I did the same for php7.1-mbstring but for some reason it won't get loaded:

forge@staging:~/test$ php -m
[PHP Modules]
Core
ctype
date
dom
fileinfo
filter
hash
iconv
json
libxml
openssl
pcre
PDO
pdo_sqlite
Phar
posix
Reflection
session
SimpleXML
SPL
sqlite3
standard
tokenizer
xml
xmlreader
xmlwriter

[Zend Modules]

I've already tried adding extension=mbstring and extension=mbstring.so to my /etc/php/7.1/fpm/php.ini and /etc/php/7.1/cli/php.ini but no succes. mbstring.ini also exists in /etc/php/7.1/mods-available:

forge@staging:~/test$ ls -l /etc/php/7.1/mods-available/
total 200
-rw-r--r-- 1 root root  72 Feb 18  2017 bcmath.ini
-rw-r--r-- 1 root root  66 Feb  9 10:41 bz2.ini
-rw-r--r-- 1 root root  74 Feb 18  2017 calendar.ini
-rw-r--r-- 1 root root  71 Feb 18  2017 ctype.ini
-rw-r--r-- 1 root root  68 Feb 18  2017 curl.ini
-rw-r--r-- 1 root root  66 Feb  9 10:41 dba.ini
-rw-r--r-- 1 root root  66 Feb 18  2017 dom.ini
-rw-r--r-- 1 root root  70 Feb 18  2017 exif.ini
-rw-r--r-- 1 root root  74 Feb 18  2017 fileinfo.ini
-rw-r--r-- 1 root root  69 Feb 18  2017 ftp.ini
-rw-r--r-- 1 root root  64 Feb 18  2017 gd.ini
-rw-r--r-- 1 root root  73 Feb 18  2017 gettext.ini
-rw-r--r-- 1 root root  66 Feb  9 10:41 gmp.ini
-rw-r--r-- 1 root root  71 Feb 18  2017 iconv.ini
-rw-r--r-- 1 root root 364 Dec 19  2016 igbinary.ini
-rw-r--r-- 1 root root  68 Feb 18  2017 imap.ini
-rw-r--r-- 1 root root  68 Feb 18  2017 intl.ini
-rw-r--r-- 1 root root  68 Feb 18  2017 json.ini
-rw-r--r-- 1 root root  68 Feb  9 10:41 ldap.ini
-rw-r--r-- 1 root root  76 Feb 18  2017 mbstring.ini
-rw-r--r-- 1 root root  72 Feb 18  2017 mcrypt.ini
-rw-r--r-- 1 root root 176 Feb 12  2017 memcached.ini
-rw-r--r-- 1 root root  74 Dec  7  2016 msgpack.ini
-rw-r--r-- 1 root root  71 Feb 18  2017 mysqli.ini
-rw-r--r-- 1 root root  72 Feb 18  2017 mysqlnd.ini
-rw-r--r-- 1 root root  79 Feb 18  2017 opcache.ini
-rw-r--r-- 1 root root  69 Feb 18  2017 pdo.ini
-rw-r--r-- 1 root root  74 Feb 18  2017 pdo_mysql.ini
-rw-r--r-- 1 root root  74 Feb 18  2017 pdo_pgsql.ini
-rw-r--r-- 1 root root  77 Feb 18  2017 pdo_sqlite.ini
-rw-r--r-- 1 root root  70 Feb 18  2017 pgsql.ini
-rw-r--r-- 1 root root  70 Feb 18  2017 phar.ini
-rw-r--r-- 1 root root  71 Feb 18  2017 posix.ini
-rw-r--r-- 1 root root  76 Feb 18  2017 readline.ini
-rw-r--r-- 1 root root  71 Feb 18  2017 shmop.ini
-rw-r--r-- 1 root root  72 Feb 18  2017 simplexml.ini
-rw-r--r-- 1 root root  68 Feb 18  2017 soap.ini
-rw-r--r-- 1 root root  73 Feb 18  2017 sockets.ini
-rw-r--r-- 1 root root  74 Feb 18  2017 sqlite3.ini
-rw-r--r-- 1 root root  73 Feb 18  2017 sysvmsg.ini
-rw-r--r-- 1 root root  73 Feb 18  2017 sysvsem.ini
-rw-r--r-- 1 root root  73 Feb 18  2017 sysvshm.ini
-rw-r--r-- 1 root root  68 Feb  9 10:41 tidy.ini
-rw-r--r-- 1 root root  75 Feb 18  2017 tokenizer.ini
-rw-r--r-- 1 root root  67 Feb 18  2017 wddx.ini
-rw-r--r-- 1 root root  66 Feb 18  2017 xml.ini
-rw-r--r-- 1 root root  72 Feb 18  2017 xmlreader.ini
-rw-r--r-- 1 root root  72 Feb 18  2017 xmlwriter.ini
-rw-r--r-- 1 root root  66 Feb 18  2017 xsl.ini
-rw-r--r-- 1 root root  66 Feb 18  2017 zip.ini

What could be the issue here?!

Roemer
  • 1,336
  • 1
  • 15
  • 39
  • Did you check php-fpm logs? There should be failure reason .. – lubosdz Feb 13 '18 at 11:39
  • @lubosdz There is not, just some logs about me restarting it: ``` [13-Feb-2018 11:16:08] NOTICE: fpm is running, pid 4433 [13-Feb-2018 11:16:08] NOTICE: ready to handle connections [13-Feb-2018 11:16:08] NOTICE: systemd monitor interval set to 10000ms [13-Feb-2018 11:33:06] NOTICE: Terminating ... [13-Feb-2018 11:33:06] NOTICE: exiting, bye-bye! ``` – Roemer Feb 13 '18 at 11:42
  • Check also `/var/log/messages` e.g. I can see there "PHP Warning: PHP Startup: Unable to load dynamic library ..." – lubosdz Feb 13 '18 at 11:55
  • @lubosdz That file does not exist for me – Roemer Feb 13 '18 at 13:12

0 Answers0