rhubarbgroup / redis-cache

A persistent object cache backend for WordPress powered by Redis. Supports Predis, PhpRedis, Relay, replication, sentinels, clustering and WP-CLI.
https://wordpress.org/plugins/redis-cache/
GNU General Public License v3.0
425 stars 148 forks source link

Not writeable fault with ssh2 option #516

Closed blackwingcat closed 4 months ago

blackwingcat commented 4 months ago

Systemfile not writeable with FS_METHOD ssh2 option

Description

This plugin does not work correctly with FS_METHOD ssh2 option, cause of fail to request_filesystem_credentials() https://wordpress.org/support/topic/redis-object-cache-filesystem-not-writeable-fault/ same issue.

Expected Behavior

to access filesystem without request_filesystem_credentials.

Actual Behavior

This plugin gives up to access file system

Possible Fix

Other plugin work same environment

Steps to Reproduce

  1. wp_config.php includes define('FS_METHOD', 'ssh2');
  2. Check to work redis cache plugin.
  3. It shows filesystem "not writeable"

Additional context

Redis cache does not work correctly.

Environment

WordPress version: 6.5 Client: PhpRedis (v5.3.7) PHP Version: 7.4.33 Plugin Version: 2.5.1 Redis Version: 7.0.12 Predis: 2.1.2

tillkruss commented 4 months ago

That is expected. The plugin works best with the direct filesystem method. If you need ssh2 support we're open to Pull Requests.

blackwingcat commented 4 months ago

I want ssh2 support if it's ok ! : 3

Now I tried to use it with left SSH2 enabled. It shows "Error establishing a Redis" every few days. Perhaps it needs native ssh2 support.

tillkruss commented 4 months ago

We won't be adding SSH filesystem support. If you're stuck on that, you can copy the object-cache.php file in place by hand.

The error Error establishing a Redis is unrelated to SSH support.