stil / gd-text

PHP class making it easy to type text on pictures. Supports multi-lined text, horizontal and vertical alignment.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Call to undefined function GDText\imageftbbox()

carolineplanet opened this issue · comments

I don't know how to use gd-text, I can't get defined the imageftbbox function. I think I have all php and gd installed but it's impossible to run this.

The error I get:

Fatal error: Call to undefined function GDText\imageftbbox() in /vendor/stil/gd-text/src/Box.php on line 383

Does anybody know how can I do?

Thank you!

try to install freetype-devel and jpeg-devel,
if you're using docker:

RUN apk update && \
    apk add --no-cache git jpeg-dev postgresql-dev zlib-dev freetype-dev libpng-dev libxml2-dev autoconf $PHPIZE_DEPS && \
    pecl install -f xdebug

# install/enable extensions
RUN docker-php-ext-configure pgsql -with-pgsql=/usr/local/pgsql && \
    docker-php-ext-configure intl && \
    docker-php-ext-configure gd --with-jpeg --with-freetype && \
    docker-php-ext-install pdo_pgsql pgsql gd intl soap bcmath && \
    docker-php-ext-enable xdebug

this worked for me