Join 1M+ other developers and:
- Get help and share knowledge in Q&A
- Subscribe to topics of interest
- Get courses & tools that help you grow as a developer or small business owner
How to Setup Laravel with DigitalOcean Managed Redis Cluster?
Redis is an open source, advanced key-value store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets, and sorted sets.
According to the official Laravel documentation here, for the sake of performace it is better to use the
PhpRedis PHP extension rather than
However as all connections to DigitalOcean Redis databases are encrypted with TLS/SSL to protect your data in transit, the PHP Redis module that comes out of the box from the default Ubuntu repository is version 3.1.6 which does not support TLS/SSL.
So if you try to connect your Laravel application using the default
phpredis extension you would get a similiar error like this:
PHP Warning: Redis::connect(): SSL operation failed with code 1. OpenSSL Error messages: error:1409442E:SSL routines:ssl3_read_bytes:tlsv1 alert protocol version in /app/vendor/laravel/framework/src/Illuminate/Redis/Connectors/PhpRedisConnector.php on line 96
Here’s how you could solve this!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.×