I installed phpredis via pecl to my docker container (running with PHP-7.4.1-apache-buster):
RUN pecl install -f redis-5.3.1 && docker-php-ext-enable redis
I am connected to the redis server, but for all the commands I get: ERR: unknown command
$redis->select(1);
$redis->getLastError();
$redis->set('test', 'test');
$redis->getLastError();
$redis->get('test');
$redis->getLastError();
Where getLastError() returns:
'ERR unknown command 'SELECT'�'
'ERR unknown command 'SET'�'
'ERR unknown command 'GET'�'
It looks like error message contains some wrongly encoded character, which might be the cause of the problem.
I already tried to install different versions: 5.3.1 and 5.2.0 but the result is the same.