Redis Extension Bug - Upgrade needed
See original GitHub issueWhat version of the buildpack you are using? v4.3.79 - v4.3.82
If you were attempting to accomplish a task, what was it you were attempting to do? Using the included Redis extension to connect to a Redis Cluster
What did you expect to happen? Successful connection to Redis
What was the actual behavior? Exception thrown stating “No such file or directory”
No such file or directory {"exception":"[object] (RedisException(code: 0): No such file or directory at /home/vcap/app/vendor/laravel/framework/src/Illuminate/Redis/Connectors/PhpRedisConnector.php:120)
2019-09-11T18:31:14.92+0200 [APP/PROC/WEB/0] OUT 16:31:14 nginx | [stacktrace]
2019-09-11T18:31:14.92+0200 [APP/PROC/WEB/0] OUT 16:31:14 nginx | #0 /home/vcap/app/vendor/laravel/framework/src/Illuminate/Redis/Connectors/PhpRedisConnector.php(120): Redis->connect('kubernetes-serv...', 49948, 0, NULL, 0, 0)
2019-09-11T18:31:14.92+0200 [APP/PROC/WEB/0] OUT 16:31:14 nginx | #1 /home/vcap/app/vendor/laravel/framework/src/Illuminate/Redis/Connectors/PhpRedisConnector.php(77): Illuminate\\Redis\\Connectors\\PhpRedisConnector->establishConnection(Object(Redis), Array)
2019-09-11T18:31:14.92+0200 [APP/PROC/WEB/0] OUT 16:31:14 nginx | #2 /home/vcap/app/vendor/laravel/framework/src/Illuminate/Support/helpers.php(424): Illuminate\\Redis\\Connectors\\PhpRedisConnector->Illuminate\\Redis\\Connectors\\{closure}(Object(Redis))
2019-09-11T18:31:14.92+0200 [APP/PROC/WEB/0] OUT 16:31:14 nginx | #3 /home/vcap/app/vendor/laravel/framework/src/Illuminate/Redis/Connectors/PhpRedisConnector.php(94): tap(Object(Redis), Object(Closure))
Reproduction steps:
- Setup a Redis connection using the PhpRedis (
redis.so
) extension using a port > 32768
Reason: With the release of PHP Buildpack v4.3.79 the PhpRedis extension was upgraded to v5.0.1. But this release of the extension contains a bug which prevents connecting to Redis using a port greater than 32768. See https://github.com/phpredis/phpredis/pull/1602.
Our CF provider uses Redis port 49948 which means we have to stick with the buildpack version v4.3.78 and cannot benefit from PHP 7.3.9 and the various improvements of PhpRedis.
Recommendation: Upgrade PhpRedis extension to v5.0.2 to fix this. Additionally this will make the extension ready for PHP 7.4.
Please confirm where necessary:
- I have included a log output
- My log includes an error message
- I have included steps for reproduction
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:5 (3 by maintainers)
Top GitHub Comments
This can be closed, 4.4.0 with the fix has been released. ✨
If you don’t depend on PhpRedis 5.0 you can write a custom extension which replaces
redis.so
with the version from v4.3.78:redis.so
fromphp7-7.3.6-linux-x64-cflinuxfs3-1a76a4dd/php/lib/php/extensions/no-debug-non-zts-20180731/
redis.so
into.extensions/php-redis/
extension.py
with the content from below.extensions/php-redis/extension.py