XF 2.2 "Cookies Are Required To Use This Site"

KensonPlays

Well-known member
So I'm moving from WordPress back to XF (and will renew my license once I have enough funds in my community account).

For some reason, people can't sign in or register. I dunno why?

I checked a few threads and someone mentioned Varnish, which I don't think I have. I am on Cloudways with DigitalOcean machines. I did however, have Object Cache installed. Would this be the cause? I'm not 100% sure.

1687475022866.png

EDIT: Sometimes we also get security error.
1000000811.webp
We do have Cloudflare connected.
 
Last edited:
I've even gone through and disabled the following addons:
  • Force HTTPS Img (ozzy)
  • [tl] image optimizer
  • App for Cloudflare
  • Lazy Image Loader (xon)
  • Security & passkey (digitalpoint)
which I thought, those seem to be possible plugins affecting caching and loading, but that didn't seem to help.

Is object cache not supported? I don't see it listed on the Cache support docs, tho it could be under 'many more'.
 
Maybe not the problem, but worth looking into. It appears you are caching at multiple places. At least it appears you are trying to cache with Fastly due to the x-cache header that's present. Putting a cache in front of a cache is never a great idea because you run into problems where one cache thinks it's invalidating contents in the cache, but there's an upstream cache still serving stale content.
 
Maybe not the problem, but worth looking into. It appears you are caching at multiple places. At least it appears you are trying to cache with Fastly due to the x-cache header that's present. Putting a cache in front of a cache is never a great idea because you run into problems where one cache thinks it's invalidating contents in the cache, but there's an upstream cache still serving stale content.
Would it be object cache and cloudflare conflicting with each other, possibly?

I don't have any caching specific addons, some optimization stuff like tl's image optimizer.
 
If you’re on Cloudways, it does have Varnish enabled by default, even before any caching that goes on upstream. Turn it off in the Application settings area for that particular application.
 
Turn it off in the Application settings area for that particular application.
He may not be able to do that as he's at the mercy of his friend's needs... this is often a major issue when "using" a friends hosting account.
It's also why "back in the day" instead of "sharing" my hosting, I'd simply burn out a VPS for my friends on the dedicated server when I was that deep into the "hosting" biz.
 
Chances are he actually can. You’d need to actually use Cloudways to understand the way it works and what the specific instructions I gave meant.

CW is a management layer on top of Linode/DO/Vultr/AWS and it presents everything with a server/application mindset - so even if you only have one server, you still delineate each application in it to its own semi-sandbox. Which means you’d be able to flip the Varnish switch for just that one application without it affecting anything else.

The only time it gets messy is if you tell it you’re using a WordPress application (for it has several templates) and you install the XF in a subfolder where you’re not only getting XF mashed through CW WP preferences for caching, but also WP’s own nonsense, and that should never be done in any circumstance. (Adding a new application in CW is free and let’s you tailor the settings to the application’s needs)

That said, this is one of the reasons not to use a friend's hosting, in case they don't want to let you change the settings (which won't affect anything else on the server) for superstitious reasons...
 
Chances are he actually can. You’d need to actually use Cloudways to understand the way it works and what the specific instructions I gave meant.
There's a difference between an "application" and a domain.
And pretty sure there is a difference between CloudWays and CloudFlare. ;)
You make an assumption that they are using CloudWays.
That is ONE hosting provider amongst how many available? Odds of his friend using it are about as likely as me winning the lottery.
It's rather hard to easily tell exactly how many caching mechanisms may be in play since he's behind CloudFlare.

And that was one of my points about "sharing" someone else hosting.. you are entirely at their mercy as to what THEY need.. not what you do.
It's why I gave those I helped their own VPS to do what they needed with.
 
Last edited:
Because I read the OP where he says he's using Cloudways on DO?

As for a difference between an application and a domain? Yes, I do know the difference, but I'm also a CW customer myself and what I was suggesting was... well... see how it looks on mine.

I went to one of the servers I have, I picked an application, I went to the application settings and there's the Varnish setting for that application.

Chances are if it's cookies on Cloudways it's Varnish first and foremost.
 

Attachments

  • Cloudways.webp
    Cloudways.webp
    56.8 KB · Views: 13
@Arantor it was originally set up as a woocommerce install. Would he need to remove the setup and create a new one in order for me to not have this issue?

Or would they simply be able to turn off varnish even though it's originally a WordPress setup but just changed to xenforo?
 
Should still be able to turn it off where I suggested, but Cloudways sets up a bunch of things for apps defined as WordPress installs that it won’t particularly like being moved if you replace it with anything not WordPress (e.g. their Malcare install), and putting XF into a subfolder of WP is just a bad idea all round - better to make a new application on the server in that case.

If you’re replacing the WP wholesale, you’re honestly better off deleting the WP application and making it as a new PHP/MySQL application as that way you don’t get things left behind that shouldn’t be there.
 
Should still be able to turn it off where I suggested, but Cloudways sets up a bunch of things for apps defined as WordPress installs that it won’t particularly like being moved if you replace it with anything not WordPress (e.g. their Malcare install), and putting XF into a subfolder of WP is just a bad idea all round - better to make a new application on the server in that case.

If you’re replacing the WP wholesale, you’re honestly better off deleting the WP application and making it as a new PHP/MySQL application as that way you don’t get things left behind that shouldn’t be there.
Yea was hoping for a good temporary fix, since it may be a week or so before a new host for my site is available.
 
Turning off Varnish should do the trick, like I originally said, and you can still do things until your new site - just what you have is not optimal configuration.
 
Turning off Varnish should do the trick, like I originally said, and you can still do things until your new site - just what you have is not optimal configuration.
Yea, I can't really say what the new host will be yet, since it isn't finalized, but it will be sweet.

I asked my friend to turn off varnish on my install, but still waiting on a response, may be slow to respond on weekends, dunno.
 
Chances are if it's cookies on Cloudways it's Varnish first and foremost.
If using Varnish... it's the most likely culprit... Varnish has historically presented "weird" issues for XF. In fact this deals with a similar issue.

And this one as far back as 2015 with similar issue.
 
Last edited:
So if I were to get another host/VPS, what cache would you recommend?
The only caching I've used for years are memcached, Redis and opcache directly on the VPS/server instance.
Use CloudFlare for most of the other stuff to speed up serving the pages.
And if you play with CloudFlare... avoid RocketLoader (or better known as Rocket<EXP>Loader) like the plague.
 
Back
Top Bottom