Trouble to use php-redis
Stefan39 opened this issue · 3 comments
Hi Dave,
I'm using your docker-files and activate php-redis with PHP_ENABLE_REDIS=true
on the environment. But if I'm login into bash and execute a php script i got the following error:
$ bin/console help
PHP Warning: PHP Startup: Unable to load dynamic library 'redis.so' (tried: /usr/lib/php/20220829/redis.so (/usr/lib/php/20220829/redis.so: undefined symbol: igbinary_serialize), /usr/lib/php/20220829/redis.so.so (/usr/lib/php/20220829/redis.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
Have you any idea?
Can you tell me what image tag you are using?
Hi Dave,
Dockerfile:
FROM tiredofit/nginx-php-fpm:debian-8.2
# additional ENV vars
ENV NODE_VERSION=20.5.1
ENV NVM_DIR=/root/.nvm
# Install NVM for node
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
RUN . "$NVM_DIR/nvm.sh" \
&& nvm install ${NODE_VERSION}
RUN . "$NVM_DIR/nvm.sh" \
&& nvm use v${NODE_VERSION}
RUN . "$NVM_DIR/nvm.sh" \
&& nvm alias default v${NODE_VERSION}
ENV PATH="/root/.nvm/versions/node/v${NODE_VERSION}/bin/:${PATH}"
# Install npm and yarn
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
RUN apt update \
&& apt install vim nodejs yarn -y
RUN php-ext enable redis \
&& php-ext enable calendar \
&& php-ext enable zip
docker-compose.yml:
services:
php:
build: ./docker
container_name: "${PROJECT_NAME}-app"
labels:
- "traefik.enable=true"
- "traefik.docker.network=web"
- "traefik.http.routers.${PROJECT_NAME}.rule=Host(`${PROJECT_NAME}.${DOMAIN_SUFFIX}`)"
env_file:
- ./.env
ports:
- "9003:9003"
volumes:
# Source code
- ./app:/www/html
networks:
frivol:
web:
aliases:
- "${PROJECT_NAME}.${DOMAIN_SUFFIX}"
networks:
frivol:
driver: bridge
web:
external: true
my .env:
PROJECT_NAME=admin
DOMAIN_SUFFIX=docker.localhost
TRAEFIK_PATH=../traefik
PHP_IDE_CONFIG="serverName=${PROJECT_NAME}.${DOMAIN_SUFFIX}"
NGINX_WEBROOT=/www/html/public
PHP_ENABLE_REDIS=true
PHP_ENABLE_IGBINARY=true
PHP_ENABLE_XDEBUG=true
PHP_MEMORY_LIMIT=2G
PHP_XDEBUG_MODE=develop
PHP_XDEBUG_CLIENT_HOST=host.docker.internal
PHP_XDEBUG_CLIENT_PORT=9003
OK, there is definitely something wrong here with the build system! I just pulled those images myself and found it's giving me 7.4.2
which is from February. 7.6.15
is the latest. I'm heading out for a few days into the woods, and will keep this as a TODO for when I return Monday. It should be a quick fix. In meantime, did you want to try this tag: 8.2-debian-bullseye
- I believe this should give you immediate results. I'm going off this reference: https://hub.docker.com/r/tiredofit/nginx-php-fpm/tags