.litespeed_err_flag

Hedloff

Well-Known Member
#1
Hello,

Tried enabling LiteSpeed cache plugin in WHM for a customer but got an error/warning. And checking in customers public_html folder I see a file called .litespeed_err_flag.
Checking file the content is:
Code:
This file was created by LiteSpeed's Web Cache Manager plugin (WHM/cPanel).
When this file exists, your LiteSpeed Cache for WordPress plugin will not
be affected by Mass Enable/Disable operations performed through LiteSpeed's WHM plugin.
Is there anywhere I can check why it failed and what caused it? I cannot get lscache to work on this wp installation, but others on the same server is working fine.
 

Michael A

Administrator
Staff member
#2
Hi Hedloff,

In the WHM plugin, was a red flag set or an 'unknown error' displayed?

This usually indicates that PHP encountered a fatal error while we were trying to load the WP environment before enabling. 9 times out of 10 this is due to a PHP out of memory error but can also be caused by other WordPress plugins already installed behaving in an unexpected way.

You can usually find the OOM error in the WordPress installation's root or wp-admin error log. Otherwise I would also check the cpanel error log.

If you need any assistance looking into this I would be more than happy to have a look. Just PM me with root SSH and WHM credentials.

Regards,
-Michael
 

Hedloff

Well-Known Member
#3
I tried removing/installing plugin trough WHM then the flag came.

I tried cloning the installation trough Softaculous and then deactivated all plugins, removed them and removed all themes and used standard theme.
I am not getting any "hit" in the header for this page.

I'm only getting:
X-LiteSpeed-Cache-Control: no-cache and X-LiteSpeed-Tag: eed1_PGSRP,eed1_URL.c4a93ebb3d2052fd924929bafaf0d091,eed1_F,eed1_Po.8,eed1_PGS,eed1_

On another page customer has on same cPanel account I get:
X-LiteSpeed-Tag: B1_F,B1_Po.8,B1_
In the reponse header.

I have tried refreshing the page and in different browsers aswell.

In wp-admin I see some old errors from earlier today:
Code:
[02-Aug-2017 10:44:23 UTC] PHP Fatal error:  require_once(): Failed opening required '/home/username/public_html/sitename/wp-content/plugins/litespeed-cache/admin/class-litespeed-cache-admin.php' (include_path='.;/path/to/php/pear') in /usr/local/lsws/add-ons/webcachemgr/shared/lscwp_interact.php on line 397
 

Hedloff

Well-Known Member
#4
Tried disabling plugin trough WHM and then I got:
  • /home/username/public_html/sitename - Unknown error encountered - No Action Taken.
    Checking error_log in wp-admin it was updated with same error as earlier. Checking line 397 I see this:
    Code:
        require_once WP_PLUGIN_DIR . '/litespeed-cache/admin/class-litespeed-cache-admin.php';
 

Michael A

Administrator
Staff member
#5
Hi Hedloff,

It looks like that file was renamed in our recent LSCWP release without me noticing (Sorry about that!). Users with LSCWP v1.1.3+ will have this error, working on a fix now.
 

Michael A

Administrator
Staff member
#6
As a hotfix for the time being please change
PHP:
require_once WP_PLUGIN_DIR . '/litespeed-cache/admin/class-litespeed-cache-admin.php';
to
PHP:
    if ( version_compare($lscwp_data['Version'], '1.1.2.2', '>') )
        require_once WP_PLUGIN_DIR . '/litespeed-cache/admin/litespeed-cache-admin.class.php';
    else
        require_once WP_PLUGIN_DIR . '/litespeed-cache/admin/class-litespeed-cache-admin.php';
on line 397 of
Code:
/usr/local/lsws/add-ons/webcachemgr/shared/lscwp_interact.php
 

Michael A

Administrator
Staff member
#7
Hello again Hedloff,

We've just put out build 10 of v5.2 and build 5 of v5.1.17 which should address this issue in the WHM plugin (look for v2.2.1).

I've also patched both affected LSCWP versions to prevent any new upgrades/installs from causing problems for users using an older WHM plugin version.

Let me know if you are still encountering issues after updating to the latest build.

Regards,
-Michael
 

Hedloff

Well-Known Member
#8
Thanks :) But I had to rescan all sites because many was showing enabled when they did not have cache plugin installed.
Would it be possible to get a function (button) or something that checks that the site is actually working with the plugin? If not, get a warning?
 

Michael A

Administrator
Staff member
#9
The reason for that is we only store the 'last checked' status, so it is possible to be out of date the next time you look at it. If you want to get the most recent you can use 'Refresh Status' next to the install to get the current status or at the top to do it for all discovered installations. If you are enabling/disabling (single or mass) it should behave correctly regardless of the displayed status though.

If I am misunderstanding your suggestion let me know!
 
Top