LiteSpeed Cache - Community

LiteSpeed Cache - Community 1.0.4.3

No permission to download
If you have a hosting provider (e.g. you get your hosting from another site), please confirm with them to see if your server includes the module.

If you have access to it, an alternative is to visit our client area here and let us know what type of license you have (2-CPU and up have lscache by default, a trial license has it as well, for others it is an addon).

IF you can confirm that your license includes lscache, then please link the documentation you used.
 
Anyone have any idea how to fix this issue?

Error Info

ErrorException: Undefined index: litespeedcacheXF_logincookie - library/Litespeedcache/Listener/Global.php:533
Stack Trace
#0 /home/ga/public_html/library/Litespeedcache/Listener/Global.php(533): XenForo_Application::handlePhpError(8, 'Undefined index...', '/home/ga/...', 533, Array)
#1 [internal function]: Litespeedcache_Listener_Global::checkPostDispatch(Object(DBTech_Credits_XenForo_ControllerAdmin_Option), Object(XenForo_ControllerResponse_Redirect), 'XenForo_Control...', 'Save')
#2 /home/ga/public_html/library/XenForo/CodeEvent.php(58): call_user_func_array(Array, Array)
#3 /home/ga/public_html/library/XenForo/Controller.php(363): XenForo_CodeEvent::fire('controller_post...', Array, 'XenForo_Control...')
#4 /home/ga/public_html/library/XenForo/FrontController.php(358): XenForo_Controller->postDispatch(Object(XenForo_ControllerResponse_Redirect), 'XenForo_Control...', 'Save')
#5 /home/ga/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#6 /home/ga/public_html/admin.php(13): XenForo_FrontController->run()
#7 {main}
 
If you have a hosting provider (e.g. you get your hosting from another site), please confirm with them to see if your server includes the module.

If you have access to it, an alternative is to visit our client area here and let us know what type of license you have (2-CPU and up have lscache by default, a trial license has it as well, for others it is an addon).

IF you can confirm that your license includes lscache, then please link the documentation you used.

I have my own server.

Here is my licence :
0f8ba2c2cb8836339e96390623c03b611.webp
 
Anyone have any idea how to fix this issue?

Error Info

ErrorException: Undefined index: litespeedcacheXF_logincookie - library/Litespeedcache/Listener/Global.php:533
Stack Trace
#0 /home/ga/public_html/library/Litespeedcache/Listener/Global.php(533): XenForo_Application::handlePhpError(8, 'Undefined index...', '/home/ga/...', 533, Array)
#1 [internal function]: Litespeedcache_Listener_Global::checkPostDispatch(Object(DBTech_Credits_XenForo_ControllerAdmin_Option), Object(XenForo_ControllerResponse_Redirect), 'XenForo_Control...', 'Save')
#2 /home/ga/public_html/library/XenForo/CodeEvent.php(58): call_user_func_array(Array, Array)
#3 /home/ga/public_html/library/XenForo/Controller.php(363): XenForo_CodeEvent::fire('controller_post...', Array, 'XenForo_Control...')
#4 /home/ga/public_html/library/XenForo/FrontController.php(358): XenForo_Controller->postDispatch(Object(XenForo_ControllerResponse_Redirect), 'XenForo_Control...', 'Save')
#5 /home/ga/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#6 /home/ga/public_html/admin.php(13): XenForo_FrontController->run()
#7 {main}

John,

Could you please verify that you are using the latest version? That issue should be resolved with 1.0.3.2.
 
@allewreK Thanks for the confirmation.

Which documentation did you follow to set up lscache? That error should only pop up during situations where the cache is not active. Is it possible that you have another server (Apache, for example) running?
 
@allewreK Thanks for the confirmation.

Which documentation did you follow to set up lscache? That error should only pop up during situations where the cache is not active. Is it possible that you have another server (Apache, for example) running?

I followed the following instructions : https://www.litespeedtech.com/suppo..._wiki:cache:common_installation:cpanel-shared.

My LiteSpeed server "cache" configuration is the following :
4597071488bd4bc5cadeb673a006a82e.webp

And my .htaccess file is :
Code:
#LiteSpeed XenForo cache
<IfModule litespeed>
    CacheLookup public on
    CacheEnable public /
      RewriteEngine On
        RewriteCond %{HTTP_COOKIE} !skipPageCache
    RewriteRule .* - [E="cache-vary:skipPageCache,xf_language_id"]
</IfModule>

That's the only configuration I have.

/tmp/xfcache have the correct rights.
 
What version of LSWS are you using? Per your cache configurations, it looks like you are running an older version of LSWS, which may be causing some issues.
 
What version of LSWS are you using? Per your cache configurations, it looks like you are running an older version of LSWS, which may be causing some issues.

5.0.8.
If I upgrade, I have a bug causing people to trigger the CloudFlare built-in anti DDOS system.
 
The minimum requirement for the XF plugin to work is version 5.0.12. This is likely why you are seeing that specific error message.

If you are willing, please try to upgrade to the latest version (5.1.8) when your site(s) is/are low traffic. If you run into the anti DDOS problem again, you can open a ticket in the client area with us, and we will investigate that issue.

Unfortunately, with 5.0.8, we cannot guarantee full compatibility even if we remove the cache check from the code, so upgrading is likely the better option.
 
The minimum requirement for the XF plugin to work is version 5.0.12. This is likely why you are seeing that specific error message.

If you are willing, please try to upgrade to the latest version (5.1.8) when your site(s) is/are low traffic. If you run into the anti DDOS problem again, you can open a ticket in the client area with us, and we will investigate that issue.

Unfortunately, with 5.0.8, we cannot guarantee full compatibility even if we remove the cache check from the code, so upgrading is likely the better option.

Ok thanks you very much Kevin, that's my problem.

I will see if the other problem is still here, but you solved the cache one ;-)
 
Last question @lsKevin :

I have the good header "hit cache".

But each time I refresh the page, the content is being updated.
Any idea why ?
 
Last edited:
Is it currently an active time for your site? It is possible that someone else got the cache miss.

Also, I just remembered, please remove this line from your .htaccess file:


CacheEnable public /

It may be causing some problems.
 
My .htaccess consists of the following code

Code:
RewriteOptions inherit
#    Mod_security can interfere with uploading of content such as attachments. If you
#    cannot attach files, remove the "#" from the lines below.
#<IfModule mod_security.c>
#    SecFilterEngine Off
#    SecFilterScanPOST Off
#</IfModule>
RewriteEngine on
#RewriteBase /kamal
RewriteRule [^/]+/([\d]+)-.+-([\d]+).html showthread.php?t=$1&page=$2 [NC,L]
RewriteRule [^/]+/([\d]+)-.+.html showthread.php?t=$1 [NC,L]

ErrorDocument 401 default
ErrorDocument 403 default
ErrorDocument 404 default
ErrorDocument 405 default
ErrorDocument 406 default
ErrorDocument 500 default
ErrorDocument 501 default
ErrorDocument 503 default

<IfModule mod_rewrite.c>
    RewriteEngine On

       
    #    If you are having problems with the rewrite rules, remove the "#" from the
    #    line that begins "RewriteBase" below. You will also have to change the path
    #    of the rewrite to reflect the path to your XenForo installation.
    #RewriteBase /xenforo

    #    This line may be needed to enable WebDAV editing with PHP as a CGI.
    #RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

    RewriteCond %{HTTP_HOST} !^www\.ga.net$
    RewriteRule ^(.*)$ http://www.ga$1 [R=301,L]
    RewriteRule .*\\.(gif|jpe?g|png|bmp)$ - [F]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [NC,L]
    RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L]
    RewriteRule ^.*$ index.php [NC,L]
</IfModule>

### LSCACHE START LOGIN COOKIE ###
RewriteRule .* - [E="cache-vary:xf_style_id"]
### LSCACHE END LOGIN COOKIE ###



IMPORTANT: Verification has determined that your cache vary rewrite rule may be incorrect. Verification checks your settings against this rewrite rule for the possibility of language vary, theme vary, and login cookie vary. To match your settings, your cache vary rewrite rule should include at least the following.


### LSCACHE START LOGIN COOKIE ###
RewriteRule .* - [E="cache-vary:xf_style_id"]
### LSCACHE END LOGIN COOKIE ###
 
Is it currently an active time for your site? It is possible that someone else got the cache miss.

Also, I just remembered, please remove this line from your .htaccess file:


CacheEnable public /

It may be causing some problems.

Even with that line :
Code:
x-litespeed-cache:miss

Strange...
 
Ok I have some problems :

- I can't log in to my control panel
- I can't login to a htaccess/htpasswd prompt
- My visitors that have two-step authentification can't login to the forum

It looks like my config is good, is this some bug ?
 
@allewreK The reason you cannot use that rewrite rule (and you should also turn Enable Public Cache back to not set) is because when it is 'on', the server will cache every request. This is incorrect behavior, as the XF plugin should tell the server what is cacheable and what is not (as an example, XF control panel - this was cached because of setting 'Enable Public Cache' to On).

When both are off, you mentioned that the cache was always missing. Is it possible that the site was very active at the time? If so, when someone posts a new reply, the front page will get purged. When I visited your site, I noticed that your TTL was set to 190 seconds. A short TTL is not needed as we should be clearing the cache every time someone makes an updated post anyway.

Let me know if this is still confusing,
Kevin
 
Top Bottom