martialblog / docker-limesurvey

A Docker Image for LimeSurvey
https://hub.docker.com/r/martialblog/limesurvey/
MIT License
148 stars 67 forks source link

Cannot find any of the supported PHP image extensions! #179

Open hirschnase opened 10 months ago

hirschnase commented 10 months ago

Hello everyone,

I installed a fresh copy of the Docker image

martialblog/limesurvey:6-apache

an after loggin in into the admin web UI I tried to upload an image. I get an error message:

Cannot find any of the supported PHP image extensions!

I was able to fix that by installing GD and ImageMagick into the running container, but my question is: why are these essential PHP libraries missing in this Docker image? Am I the only one with this kind of problem?

That's what I did to make it work:

docker exec -ti -u root limesurvey6 apt update
docker exec -ti -u root limesurvey6 apt install libgd3 libgd-dev
docker exec -ti -u root limesurvey6 docker-php-ext-configure gd
docker exec -ti -u root limesurvey6 docker-php-ext-install -j5 gd
docker exec -ti -u root limesurvey6 apt install imagemagick
docker exec -ti -u root limesurvey6 apt install libmagickwand-dev
docker exec -ti -u root limesurvey6 pecl install imagick
docker exec -ti -u root limesurvey6 echo "extension=imagick.so" >>/usr/local/etc/php/php.ini

Thanks, Marc

hirschnase commented 10 months ago

Btw, I had the exact same problems with the latest LS v3 Docker images...

martialblog commented 10 months ago

Hi, thanks for the hint. I'll have a look at it.

I'm not using it on a daily basis anymore, so I rely on users to help me find issues like that.

martialblog commented 9 months ago

Hey, can you provide some more info on how to recreate this error? I did not see an error in the admin panel with a fresh build.

hirschnase commented 9 months ago

Thanks for your feedback! I installed LS v6 and used an existing LS database structure from an old version. Just to make sure that this does not cause any trouble, I started another LS v6 docker container and connected it against a fresh, empty MySQL database.

This is the create script that I used:

docker run \
  --detach \
  --name limesurvey6-2 \
  --env DB_TYPE=mysql \
  --env DB_HOST=127.0.0.1 \
  --env DB_PORT=3308 \
  --env DB_NAME=limesurvey6_2 \
  --env DB_USERNAME=limesurvey6_2 \
  --env DB_PASSWORD=XYZ \
  --env DB_TABLE_PREFIX="lime6_" \
  --env DBENGINE="INNODB" \
  --env ADMIN_USER=admin \
  --env ADMIN_NAME="Limesurvey Administrator" \
  --env ADMIN_EMAIL=admins@domain.com \
  --env ADMIN_PASSWORD=changeme \
  martialblog/limesurvey:6-apache

The database structure gets bootstrapped as far as I can see, but I am not able to sign in into the admin interface. I get the error message "Internal database authentication method is not allowed for this user".

I then dropped the DB, created a new one and then ran the command

~/html/application/commands$ php console.php install admin changeme Admin admins@domain.com verbose

inside the docker container:

Connecting to database...
Using connection string mysql:host=127.0.0.1;port=3308;dbname=limesurvey6_2;
Creating tables...
Creating admin user...
Creating permissions ...
All done!

but I still can not log in with the admin account...

Any suggestions?