Login Being Blocked

Post

Posted
Rating:
#4895 (In Topic #1083)
Standard member
ooblek is in the usergroup ‘Well-settled’
I have uploaded Composr on two of my sites (OcPortal is in a folder behind the front page and the site links access both). Anyhow, when I attempt to work inside Composr, before long, it un-logs me and requires me to log back in. But then it refuses my login and claims that I am using someone else's id. This then starts happening on the OcPortal site as well. I am trying to find something in the configuration that makes that happen, but I haven't found it yet. What is my solution?
Online now: No Back to the top

Post

Posted
Rating:
#4902
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
claims that I am using someone else's id

I doubt that's what Composr is saying so please give the specific error message so we can understand better. It might be something about cookies conflicting. Or it might be coming from somewhere other than Composr.

Normally Composr sites will not conflict with session cookies at least, because each site is given a randomised cookie name. However, if you somehow cloned one site to create the other, that could explain overlapping configuration.

The session cookie name is configured in _config.php and looks something like this:

Code

$SITE_INFO['session_cookie'] = 'cms_session__d61768dc037c33acddb1eb501ac22a14';

Really you should also code each site to have its own cookie path. The default is the webroot, like:

Code

$SITE_INFO['cookie_path'] = '/';

But if you have multiple sites you may want to do like:

Code

$SITE_INFO['cookie_path'] = '/site_a';
and

Code

$SITE_INFO['cookie_path'] = '/site_b';

You would then need to clear out any existing cookies on your domain in your web browser to stop the conflict continuing.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Mastodon. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top

Post

Posted
Rating:
#4903
Standard member
ooblek is in the usergroup ‘Well-settled’
Thanks, Chris, as I considered further, I think my main problem is trying to put Composr in the same website that contains OcPortal. I had not gone very far, so I think I will not try to do that. I will put Composr into a diffferent site.

As you suggest, the cookies are likely getting confused.

Thanks
Online now: No Back to the top
1 guest and 0 members have just viewed this.
Back to Top