Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

images broken in docker, ubuntu 22.04 #81

Closed
shadedclip opened this issue Dec 20, 2024 · 4 comments
Closed

images broken in docker, ubuntu 22.04 #81

shadedclip opened this issue Dec 20, 2024 · 4 comments

Comments

@shadedclip
Copy link

hi,
i have instance running on docker on kubuntu 22.04, i have tried both with and without lottie-converter and made sure that the bash declaration is at the top, and ffmpeg is in the $path but images are broken. when i click on the broken image and open it, i get this error:

Error: Call to undefined function imagecreatefromstring() in /var/www/mpgram/file.php:174
Stack trace:
#0 {main}

what should i do?

@shinovon
Copy link
Owner

you are missing php-gd extension

@shadedclip
Copy link
Author

i have installed php-gd with apt, and rebuilt the container but they are still giving the same error. sorry if i'm missing something here, but how can i enable it?

@shadedclip
Copy link
Author

SOLVED: i had to add this to mpgram-web/docker/mpgram_web/Dockerfile before the apt script
(RUN apt-get update \ && apt-get -y --no-install-recommends install \ php8.3-mbstring \ ... ) runs :

RUN apt-get update \
    && apt-get install -y gnupg curl \
    && curl -fsSL https://packages.sury.org/php/apt.gpg | gpg --dearmor -o /usr/share/keyrings/php.gpg \
    && echo "deb [signed-by=/usr/share/keyrings/php.gpg] https://packages.sury.org/php/ bullseye main" > /etc/apt/sources.list.d/php.list \
    && apt-get update \
    && apt-get install -y php8.3-gd

@dariolob
Copy link
Contributor

dariolob commented Feb 12, 2025

SOLVED: i had to add this to mpgram-web/docker/mpgram_web/Dockerfile before the apt script (RUN apt-get update \ && apt-get -y --no-install-recommends install \ php8.3-mbstring \ ... ) runs :

RUN apt-get update
&& apt-get install -y gnupg curl
&& curl -fsSL https://packages.sury.org/php/apt.gpg | gpg --dearmor -o /usr/share/keyrings/php.gpg
&& echo "deb [signed-by=/usr/share/keyrings/php.gpg] https://packages.sury.org/php/ bullseye main" > /etc/apt/sources.list.d/php.list
&& apt-get update
&& apt-get install -y php8.3-gd

@shadedclip This configuration change doesn't seem to help in my case :( I've rebuilt the docker image using
sudo docker-compose build --no-cache
and then for good measure (maybe overkill) re-upped with:
sudo docker-compose up --build -d --force-recreate --remove-orphans --always-recreate-deps

But still no images whatsoever, I just get the same error message "Call to undefined function imagecreatefromstring()..."

Do you have any suggestion?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants