Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Object Cache Pro plugin causes 500 error due to PhpRedis igbinary and zstd requirement #284

Open
nquinn-ek opened this issue Mar 5, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@nquinn-ek
Copy link

After I installed the Object Cache Pro plugin on my Pantheon site, following the instructions in https://docs.pantheon.io/object-cache/wordpress, it throws a 500 error in whenever I try to load a page locally from Lando. The logs show:

NOTICE: PHP message: objectcache.critical: Failed to initialize object cache: PhpRedis was not compiled with igbinary support. 'For more information about enabling serializers see: https://objectcache.pro/docs/data-encoding/'

I confirmed that PhpRedis was not compiled with igbinary support by connecting to the running container and running php -a, then:

root@92062ea58818:/app# php -a
Interactive shell

php > use Redis;

Warning: The use statement with non-compound name 'Redis' has no effect in php shell code on line 1
php > echo defined('Redis::SERIALIZER_IGBINARY') ? 'yes' : 'no';
no

When I open the wp-config-ocp.php file added by the Pantheon OCP installer and comment out 'serializer' => 'igbinary', the error message then complains:

NOTICE: PHP message: objectcache.critical: Failed to initialize object cache: PhpRedis was not compiled with Zstandard compression support, see For more information about enabling compressions see: https://objectcache.pro/docs/data-encoding/

Commenting out 'compression' => 'zstd', then allows the page to load.

I was surprised by this, since both libraries were installed:

root@92062ea58818:/app# pecl list
Installed packages, channel pecl.php.net:
=========================================
Package   Version State
apcu      5.1.24  stable
igbinary  3.2.16  stable
imagick   3.7.0   stable
memcached 3.3.0   stable
oauth     2.0.9   stable
redis     5.3.7   stable
xdebug    3.3.2   stable
zstd      0.14.0  stable

Since the OCP plugin is officially recommended by Pantheon, and since these libraries are installed anyway, it would be ideal if PhpRedis was installed compiled to use them so it would work without modification.

@nquinn-ek nquinn-ek added the bug Something isn't working label Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant