-
-
Notifications
You must be signed in to change notification settings - Fork 184
Closed
Labels
status:ready for adoptionFeel free to implement this issue.Feel free to implement this issue.type:enhancementEnhancementEnhancement
Milestone
Description
I'm trying to connect my craftcms to a digitalocean redis cluster.
Digitalocean requires a tls:// connection url:
tls://kotc-redis-do-user-698729-0.b.db.ondigitalocean.com
But your plugin doesn't support this only tcp:// and unix://.
I verified that my connection is working if I modify the class Connection.php on line 596:
public function getConnectionString()
{
return 'tls://' . ($this->redirectConnectionString ?: "$this->hostname:$this->port");
}And my connection worked directly, when I use the tcp:// it returns the following error:
{
"name": "Redis Socket Exception",
"message": "Failed to read from socket.\nRedis command was: GET CraftCMS8e0694a5966c89b99615fb42a4a74296",
}It would be handy to be able to configure de connection scheme mode:
'redis' => [
'class' => yii\redis\Connection::class,
'hostname' => getenv('REDIS_HOST'),
'scheme' => 'tls',
]My Laravel application already supports the tls:// mode, as you can read here:
https://aregsar.com/blog/2020/connecting-laravel-to-digitalocean-managed-redis-cluster/
What steps will reproduce the problem?
- Install craft
- Install yiisoft/yii2-redis
- Create a Digitalocean managed Redis database
- Use the connection details in the craft config/app.php
- run your application and open it in the browser
What's expected?
To be able to connect caching with a Digitalocean managed Redis database
What do you get instead?
An error:
{
"name": "Redis Socket Exception",
"message": "Failed to read from socket.\nRedis command was: GET CraftCMS8e0694a5966c89b99615fb42a4a74296",
}Additional info
| Q | A |
|---|---|
| Yii vesion | 2.0 |
| PHP version | 8.1 |
| Operating system | mac/ubuntu |
Metadata
Metadata
Assignees
Labels
status:ready for adoptionFeel free to implement this issue.Feel free to implement this issue.type:enhancementEnhancementEnhancement