[QUESTION] how to enable igbinary?
sergey-mazeev opened this issue · 1 comments
sergey-mazeev commented
Hi there!
My project does not run on this LAMP build with messages about igbinary, like
Undefined class constant 'Redis::SERIALIZER_IGBINARY' (0)
How to enable igbinary in this container?
sergey-mazeev commented
[UPDATE]
Finnaly I solved it.
To enable igbinary go to bin/your-php-version/Dockerfile
Find redis installation and comment it
# Install redis
#RUN pecl install redis-5.1.1 && \
# docker-php-ext-enable redis
Paste this code to Dockerfile
RUN echo "Installing Redis with igbinary serializer" && \
pecl install --onlyreqdeps --nobuild redis && \
pecl install igbinary && \
cd "$(pecl config-get temp_dir)/redis" && \
phpize && \
./configure --enable-redis-igbinary && \
make && make install && \
docker-php-ext-enable igbinary && \
docker-php-ext-enable redis && \
cd -
Make docker compose build
after this changes.
If you still have redis connection error, find redis server path in your project files and replace something like 127.0.0.1
or localhost
with redis
and your actual redis port (6379 by default)