Installing php7-gmagick causes a warning in any PHP code
After installation of php7-gmagick
any PHP script triggers warning:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php7/modules/.so' - Error loading shared library /usr/lib/php7/modules/.so: No such file or directory in Unknown on line 0
How to reproduce:
docker run --rm -it alpine:3.4 sh
/ # apk add --update --repository http://dl-cdn.alpinelinux.org/alpine/edge/community php7 graphicsmagick
(1/12) Installing libgcc (5.3.0-r0)
(2/12) Installing libgomp (5.3.0-r0)
(3/12) Installing libjpeg-turbo (1.4.2-r0)
(4/12) Installing libjasper (1.900.1-r12)
(5/12) Installing libltdl (2.4.6-r0)
(6/12) Installing libpng (1.6.21-r0)
(7/12) Installing libstdc++ (5.3.0-r0)
(8/12) Installing tiff (4.0.6-r3)
(9/12) Installing libxml2 (2.9.4-r0)
(10/12) Installing graphicsmagick (1.3.25-r0)
(11/12) Installing php7-common (7.0.11-r1)
(12/12) Installing php7 (7.0.11-r1)
OK: 21 MiB in 23 packages
/ # php7 -v
PHP 7.0.11 (cli) (built: Oct 10 2016 16:01:03) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
/ # apk add --update --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing php7-gmagick
(1/1) Installing php7-gmagick (2.0.4_rc1-r1)
OK: 22 MiB in 24 packages
/ # php7 -v
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php7/modules/.so' - Error loading shared library /usr/lib/php7/modules/.so: No such file or directory in Unknown on line 0
PHP 7.0.11 (cli) (built: Oct 10 2016 16:01:03) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
I believe this happens due to an error in APKBUILD because it generates config file with bad name (/etc/php7/conf.d/10_.ini) and bad content:
/ # cat /etc/php7/conf.d/10_.ini
extension=.so
(from redmine: issue id 6355, created on 2016-10-15, closed on 2018-08-22)