litespeedtech / litespeedtech/lscache_wp

Adds a "connection refused" line at begining of WP CLI responses if the Object cache setting are incorrect

Open
#549 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
257
Forks
123
PR merge metrics
No merged PRs in 30d

Description

Issue: LS cache adds a "connection refused" line at beginning of WP CLI responses if the Object cache setting is incorrect which messes up any automation

Sample:
someuser@server:# /usr/local/bin/wp plugin list  --path=/var/www/test.site/htdocs
Connection refused
+---------------------+----------+--------+---------+
| name                | status   | update | version |
+---------------------+----------+--------+---------+
| akismet             | inactive | none   | 5.1     |
| litespeed-cache     | active   | none   | 5.3.3   |
| wp-cli-login-server | must-use | none   | 1.4     |
| object-cache.php    | dropin   | none   |         |
+---------------------+----------+--------+---------+
How to reproduce:
  • Enable LS cache and object cache in LS's settings
  • Set object cache port to 11211 and type to redis ( I know this is incorrect )
  • Run any WP CLI command
Solution

LS cache shouldn't be adding that line to WP-CLI output even if object cache settings are incorrect, it should be sent out as PHP warning or notice just not a string attached to the actual output

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue by enabling LiteSpeed Cache and object caching, configuring Redis with the incorrect port/type, and running a WP-CLI command such as wp plugin list. Trace where the Connection refused text is emitted and ensure incorrect object-cache settings do not prepend it to WP-CLI output; verify that the command output remains machine-readable.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, redis, wordpress
Domain
backend, cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.