Closed developerluanramos closed 7 months ago
It sounds like your docker container does not contain the GD module. Which is weird, because the PNG generator uses the same one.
@casperbakker I have installed this one in my docker container
Docker
RUN docker-php-ext-configure gd
RUN docker-php-ext-install gd
php.ini
;extension=bz2
;extension=curl
;extension=ffi
;extension=ftp
;extension=fileinfo
;extension=gd2
extension=gd
extension=zip
;extension=gettext
;extension=gmp
;extension=intl
;extension=imap
;extension=ldap
;extension=mbstring
;extension=exif ; Must be after mbstring as it depends on it
;extension=mysqli
;extension=oci8_12c ; Use with Oracle Database 12c Instant Client
;extension=odbc
;extension=openssl
extension=pdo_firebird
;extension=pdo_mysql
;extension=pdo_oci
;extension=pdo_odbc
;extension=pdo_pgsql
;extension=pdo_sqlite
;extension=pgsql
;extension=shmop
extension=interbase
and verifying inside the docker container with php -m
I have this:
$ php -m
[PHP Modules]
Core
ctype
curl
date
dom
fileinfo
filter
ftp
gd
hash
iconv
interbase
json
libxml
mbstring
mysqlnd
openssl
pcre
PDO
PDO_Firebird
pdo_sqlite
Phar
posix
readline
Reflection
session
SimpleXML
SPL
sqlite3
standard
tokenizer
xml
xmlreader
xmlwriter
zip
zlib
[Zend Modules]
I am sorry, but I cannot help you further. It has to do with the configuration of your host. It does not have the imagejpeg()
method available. That is not a bug in this library.
Hello guys!
I am getting that error:
Fatal error: Uncaught Error: Call to undefined function Picqer\Barcode\imagejpeg()
This is my code
Everything was working well until I develop a docker container.
I am using php:7.4-fpm
Actually, I fixed this using other generator method
$gerador = new \Picqer\Barcode\BarcodeGeneratorPNG();
and it worked well. But I thought important to report that.Thanks.