Have you confirmed that the password in the .env file is actually loaded correctly? If it's unquoted in .env and contains some special characters (such as #), it might not come off correctly.
dd(config('services.redis.password'));
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hello eveybody I am using phpredis and connecting to redis using this code:
$redis = new Redis();
$redis->connect(config("services.redis.host"));
$redis->auth(config('services.redis.password'));
but on the serve I am getting such error:
RedisException
NOAUTH Authentication required.
however I set the correct redis password and host, it's all good in .env and config file.
bind 127.0.0.1 requirepass: protected-mode is no
and if I try on redis-cli it's showing exact host, port and I can auth using auth command.
redis extension is also loaded, I put 8.2 php fpm on nginx and it's all working both redis and php-fpm services are running,
I cleared cache, did optimize:clear and optimize again but still have this issue... I have no idea how is that keep happening...
also tried restart the redis and php-fpm services too but I did not get the success result.
can anyone help me solve this problem?
Extra info(FYI): I am not the full owner of the project and the the logic that written to use redis is nothing to do with laravel but it's inside laravel, probably they are using laravel as admin panel and writing the logic there without using laravel.
pls, don't ask me why :)
Please or to participate in this conversation.