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!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
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.
Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.