Report this

What is the reason for this report?

How to configure PHP Native session with redis managed database

Posted on April 14, 2021

I’m using PHP 7.2 and I’m unable to connect a Redis managed db instance.

in /etc/php/7.2/fpm/php.ini

session.save_handler = redis
; tried either :
session.save_path = "rediss://default:mypassword@db-redis-ams3-preprod-do-user-xxx-0.a.db.ondigitalocean.com:25061"
session.save_path = "tcp://default:mypassword@db-redis-ams3-preprod-do-user-xxx-0.a.db.ondigitalocean.com:25061"
session.save_path = "tls://default:mypassword@db-redis-ams3-preprod-do-user-xxx-0.a.db.ondigitalocean.com:25061"
session.save_path = "tls://db-redis-ams3-preprod-do-user-xxx-0.a.db.ondigitalocean.com:25061?auth=mypassword"

Each time same kind of issue :

RedisException
read error on connection

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.