Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP 7.2: no additional .ini files parsed

I have an ubuntu server (16.04.4 LTS) with apache2 running php7.0 (Apache 2.0 Handler) and php7.2 (FPM/FastCGI).

PHP7.2 works fine, except that there are no extensions loaded - like json or anything else. See my phpinfo():

System  Linux srvindkdif 4.4.0-62-generic #83-Ubuntu SMP Wed Jan 18 14:10:15 UTC 2017 x86_64
Build Date  Jun 22 2018 08:44:50
Server API  FPM/FastCGI
Virtual Directory Support   disabled
Configuration File (php.ini) Path   /etc/php/7.2/fpm
Loaded Configuration File   /etc/php/7.2/fpm/php.ini
Scan this dir for additional .ini files /etc/php/7.2/fpm/conf.d
Additional .ini files parsed    (none)
PHP API 20170718
PHP Extension   20170718
Zend Extension  320170718
Zend Extension Build    API320170718,NTS
PHP Extension Build API20170718,NTS
Debug Build no
Thread Safety   disabled
Zend Signal Handling    enabled
Zend Memory Manager enabled
Zend Multibyte Support  disabled
IPv6 Support    enabled
DTrace Support  available, disabled
Registered PHP Streams  https, ftps, compress.zlib, php, file, glob, data, http, ftp
Registered Stream Socket Transports tcp, udp, unix, udg, ssl, tls, tlsv1.0, tlsv1.1, tlsv1.2
Registered Stream Filters   zlib.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk

I guess the problem is, that no additional .ini files are parsed. But phpinfo says it scans the directory /etc/php/7.2/fpm/conf.d for additional .ini files. Here's the directory list:

/etc/php/7.2/fpm/conf.d> ll
insgesamt 8
drwxr-xr-x 2 root root 4096 Jun 25 16:07 ./
drwxr-xr-x 4 root root 4096 Jun 26 09:10 ../
lrwxrwxrwx 1 root root   39 Jun 25 16:06 10-mysqlnd.ini -> /etc/php/7.2/mods-available/mysqlnd.ini
lrwxrwxrwx 1 root root   39 Jun 25 16:06 10-opcache.ini -> /etc/php/7.2/mods-available/opcache.ini
lrwxrwxrwx 1 root root   35 Jun 25 16:06 10-pdo.ini -> /etc/php/7.2/mods-available/pdo.ini
lrwxrwxrwx 1 root root   35 Jun 25 16:06 15-xml.ini -> /etc/php/7.2/mods-available/xml.ini
lrwxrwxrwx 1 root root   40 Jun 25 16:06 20-calendar.ini -> /etc/php/7.2/mods-available/calendar.ini
lrwxrwxrwx 1 root root   37 Jun 25 16:06 20-ctype.ini -> /etc/php/7.2/mods-available/ctype.ini
lrwxrwxrwx 1 root root   36 Jun 25 16:06 20-curl.ini -> /etc/php/7.2/mods-available/curl.ini
lrwxrwxrwx 1 root root   35 Jun 25 16:06 20-dom.ini -> /etc/php/7.2/mods-available/dom.ini
lrwxrwxrwx 1 root root   36 Jun 25 16:06 20-exif.ini -> /etc/php/7.2/mods-available/exif.ini
lrwxrwxrwx 1 root root   40 Jun 25 16:06 20-fileinfo.ini -> /etc/php/7.2/mods-available/fileinfo.ini
lrwxrwxrwx 1 root root   35 Jun 25 16:06 20-ftp.ini -> /etc/php/7.2/mods-available/ftp.ini
lrwxrwxrwx 1 root root   34 Jun 25 16:06 20-gd.ini -> /etc/php/7.2/mods-available/gd.ini
lrwxrwxrwx 1 root root   39 Jun 25 16:06 20-gettext.ini -> /etc/php/7.2/mods-available/gettext.ini
lrwxrwxrwx 1 root root   37 Jun 25 16:02 20-iconv.ini -> /etc/php/7.2/mods-available/iconv.ini
lrwxrwxrwx 1 root root   36 Jun 25 15:55 20-json.ini -> /etc/php/7.2/mods-available/json.ini
lrwxrwxrwx 1 root root   40 Jun 25 16:03 20-mbstring.ini -> /etc/php/7.2/mods-available/mbstring.ini
lrwxrwxrwx 1 root root   38 Jun 25 16:06 20-mysqli.ini -> /etc/php/7.2/mods-available/mysqli.ini
lrwxrwxrwx 1 root root   41 Jun 25 16:06 20-pdo_mysql.ini -> /etc/php/7.2/mods-available/pdo_mysql.ini
lrwxrwxrwx 1 root root   36 Jun 25 16:06 20-phar.ini -> /etc/php/7.2/mods-available/phar.ini
lrwxrwxrwx 1 root root   37 Jun 25 16:06 20-posix.ini -> /etc/php/7.2/mods-available/posix.ini
lrwxrwxrwx 1 root root   40 Jun 25 16:06 20-readline.ini -> /etc/php/7.2/mods-available/readline.ini
lrwxrwxrwx 1 root root   37 Jun 25 16:06 20-shmop.ini -> /etc/php/7.2/mods-available/shmop.ini
lrwxrwxrwx 1 root root   41 Jun 25 16:06 20-simplexml.ini -> /etc/php/7.2/mods-available/simplexml.ini
lrwxrwxrwx 1 root root   39 Jun 25 16:06 20-sockets.ini -> /etc/php/7.2/mods-available/sockets.ini
lrwxrwxrwx 1 root root   39 Jun 25 16:06 20-sysvmsg.ini -> /etc/php/7.2/mods-available/sysvmsg.ini
lrwxrwxrwx 1 root root   39 Jun 25 16:06 20-sysvsem.ini -> /etc/php/7.2/mods-available/sysvsem.ini
lrwxrwxrwx 1 root root   39 Jun 25 16:06 20-sysvshm.ini -> /etc/php/7.2/mods-available/sysvshm.ini
lrwxrwxrwx 1 root root   41 Jun 25 16:06 20-tokenizer.ini -> /etc/php/7.2/mods-available/tokenizer.ini
lrwxrwxrwx 1 root root   36 Jun 25 16:06 20-wddx.ini -> /etc/php/7.2/mods-available/wddx.ini
lrwxrwxrwx 1 root root   41 Jun 25 16:06 20-xmlreader.ini -> /etc/php/7.2/mods-available/xmlreader.ini
lrwxrwxrwx 1 root root   41 Jun 25 16:06 20-xmlwriter.ini -> /etc/php/7.2/mods-available/xmlwriter.ini
lrwxrwxrwx 1 root root   35 Jun 25 16:06 20-xsl.ini -> /etc/php/7.2/mods-available/xsl.ini
lrwxrwxrwx 1 root root   35 Jun 25 16:06 20-zip.ini -> /etc/php/7.2/mods-available/zip.ini

I have restarted apache2 server with no effect.

How can I tell my php-fpm to use those extensions?

like image 215
DaFunkyAlex Avatar asked Jun 26 '18 07:06

DaFunkyAlex


1 Answers

As well as restarting apache, did you also restart fpm?

like image 178
Phil Rennie Avatar answered Nov 10 '22 23:11

Phil Rennie