Closed mbrodala closed 4 months ago
There is indeed no gd.ini
in /etc/php/7.4/mods-available/
:
I did not understand whats happened. I rebuild without any related changes... and it's working. Maybe a trouble with apt ? I am not sure about that. I hope that will not happens again.
To verify :
for V in '7.2' '7.3' '7.4' '8.0' '8.1' '8.2' '8.3'; do for D in 'apache' 'fpm' 'cli' 'apache-node20'; do echo -ne "\nPHP $V ($D) : "; docker run --pull always -q --rm -e "PHP_EXTENSIONS=gd" -ti "docker.io/thecodingmachine/php:$V-v4-$D" php -m | grep -E --color=none "(redis|gd)" | tr -s '\r\n' ' '; done; done;
Thanks, seems to be fixed with thecodingmachine/php:7.4-v4-fpm-node12@sha256:591f5c3d7428523a21e86741f31ddd94a1cc5d8e587c9f4a8548bd7312b5be18
. :+1:
Expected Behavior
When setting
PHP_EXTENSIONS=gd
orPHP_EXTENSION_GD=1
I expect thegd
extension to be enabled. And in addition to all PHP extensions enabled by default.Current Behavior
Example
php -m
execution to check the list of PHP extensions/modules when trying to enablegd
viaPHP_EXTENSIONS=gd
:7.4-v4-fpm-node12@sha256:9c9760211dec18f29b903ec939a51ded1447e889666bf61b557c4a5af6ac9257 & PHP_EXTENSIONS=gd
``` $ docker run --rm --env PHP_EXTENSIONS=gd thecodingmachine/php:7.4-v4-fpm-node12@sha256:9c9760211dec18f29b903ec939a51ded1447e889666bf61b557c4a5af6ac9257 php -m Invalid extension name found in PHP_EXTENSIONS environment variable. Found: 'gd'. Available extensions: amqp, apcu, ast, bcmath, blackfire, bz2, calendar, ctype, curl, dba, dom, ds, enchant, ev, event, exif, ffi, fileinfo, ftp, generated_conf, gettext, gmp, gnupg, grpc, iconv, igbinary, imagick, imap, intl, json, ldap, mailparse, mbstring, memcached, mongodb, msgpack, mysqli, mysqlnd, opcache, pcov, pdo, pdo_dblib, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, phar, posix, pspell, rdkafka, readline, redis, shmop, simplexml, snmp, soap, sockets, sqlite3, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, uuid, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, yaml, zip. [PHP Modules] calendar Core ctype curl date dom exif fileinfo filter ftp gettext hash iconv json libxml mbstring openssl pcntl pcre PDO Phar posix readline Reflection session shmop SimpleXML sockets sodium SPL standard sysvmsg sysvsem sysvshm tokenizer xml xmlreader xmlwriter xsl Zend OPcache zlib [Zend Modules] Zend OPcache ```Notice the error message which claims that
gd
does not exist. Also notice that additionally thezip
extension is suddenly missing.Similarly when using
PHP_EXTENSION_GD=1
instead, even without error message:7.4-v4-fpm-node12@sha256:9c9760211dec18f29b903ec939a51ded1447e889666bf61b557c4a5af6ac9257 & PHP_EXTENSION_GD=1
``` $ docker run --rm --env PHP_EXTENSION_GD=1 thecodingmachine/php:7.4-v4-fpm-node12@sha256:9c9760211dec18f29b903ec939a51ded1447e889666bf61b557c4a5af6ac9257 php -m [PHP Modules] apcu calendar Core ctype curl date dom exif fileinfo filter ftp gettext hash iconv igbinary json libxml mbstring mysqli mysqlnd openssl pcntl pcre PDO pdo_mysql Phar posix readline redis Reflection session shmop SimpleXML soap sockets sodium SPL standard sysvmsg sysvsem sysvshm tokenizer xml xmlreader xmlwriter xsl Zend OPcache zip zlib [Zend Modules] Zend OPcache ```However, with a previous image version this works just fine:
7.4-v4-fpm-node12@sha256:2c8d0c0a44f932137d381951dbcdddeb8b80b7d200e25d4dcf4973ea8dde1e85 & PHP_EXTENSIONS=gd
``` $ docker run --rm --env PHP_EXTENSIONS=gd thecodingmachine/php:7.4-v4-fpm-node12@sha256:2c8d0c0a44f932137d381951dbcdddeb8b80b7d200e25d4dcf4973ea8dde1e85 php -m [PHP Modules] apcu calendar Core ctype curl date dom exif fileinfo filter ftp gd gettext hash iconv igbinary json libxml mbstring mysqli mysqlnd openssl pcntl pcre PDO pdo_mysql Phar posix readline redis Reflection session shmop SimpleXML soap sockets sodium SPL standard sysvmsg sysvsem sysvshm tokenizer xml xmlreader xmlwriter xsl Zend OPcache zip zlib [Zend Modules] Zend OPcache ```7.4-v4-fpm-node12@sha256:2c8d0c0a44f932137d381951dbcdddeb8b80b7d200e25d4dcf4973ea8dde1e85 & PHP_EXTENSION_GD=1
``` $ docker run --rm --env PHP_EXTENSION_GD=1 thecodingmachine/php:7.4-v4-fpm-node12@sha256:2c8d0c0a44f932137d381951dbcdddeb8b80b7d200e25d4dcf4973ea8dde1e85 php -m [PHP Modules] apcu calendar Core ctype curl date dom exif fileinfo filter ftp gd gettext hash iconv igbinary json libxml mbstring mysqli mysqlnd openssl pcntl pcre PDO pdo_mysql Phar posix readline redis Reflection session shmop SimpleXML soap sockets sodium SPL standard sysvmsg sysvsem sysvshm tokenizer xml xmlreader xmlwriter xsl Zend OPcache zip zlib [Zend Modules] Zend OPcache ```Also works with the newest PHP/Node image at the time of this writing:
8.3-v4-fpm-node20@sha256:9293158688b95337fa9b62da866dee514471f1aae7e68329e9b45216ee2edf8d & PHP_EXTENSIONS=gd
``` $ docker run --rm --env PHP_EXTENSIONS=gd thecodingmachine/php:8.3-v4-fpm-node20@sha256:9293158688b95337fa9b62da866dee514471f1aae7e68329e9b45216ee2edf8d php -m [PHP Modules] apcu calendar Core ctype curl date dom exif fileinfo filter ftp gd gettext hash iconv igbinary json libxml mbstring mysqli mysqlnd openssl pcntl pcre PDO pdo_mysql Phar posix random readline redis Reflection session shmop SimpleXML soap sockets sodium SPL standard sysvmsg sysvsem sysvshm tokenizer xml xmlreader xmlwriter xsl Zend OPcache zip zlib [Zend Modules] Zend OPcache ```8.3-v4-fpm-node20@sha256:9293158688b95337fa9b62da866dee514471f1aae7e68329e9b45216ee2edf8d & PHP_EXTENSION_GD=1
``` $ docker run --rm --env PHP_EXTENSION_GD=1 thecodingmachine/php:8.3-v4-fpm-node20@sha256:9293158688b95337fa9b62da866dee514471f1aae7e68329e9b45216ee2edf8d php -m [PHP Modules] apcu calendar Core ctype curl date dom exif fileinfo filter ftp gd gettext hash iconv igbinary json libxml mbstring mysqli mysqlnd openssl pcntl pcre PDO pdo_mysql Phar posix random readline redis Reflection session shmop SimpleXML soap sockets sodium SPL standard sysvmsg sysvsem sysvshm tokenizer xml xmlreader xmlwriter xsl Zend OPcache zip zlib [Zend Modules] Zend OPcache ```Possible Solution
None, pin the image to the
sha256
hash of the previous version.Steps to Reproduce (for bugs)
See above.
Context
We must enable
gd
for TYPO3 projects which did work just fine so far.Your Environment
7.4-v4-fpm-node12