News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Use subdomain independent cookies problem

Started by Tristan Perry, October 16, 2004, 03:25:47 PM

Previous topic - Next topic

Tristan Perry

Hello,
This option can be really annoying. I am using SSI.php to make a 'Members Only Page' on my website, but, in-order for this page to work for everyone (Without this, only 50% can see the page), I had to turn this option on. Now that I've done that, half my members can't logout! Is there anyway to allow my members to logout, and make a members only page?
Thanks,
Tau Online.Org

Metho

At the very bottom of Settings.php, before the ?> try putting ob_start();

- Methonis
Joshua "Methonis" Frazer
Support Specialist
The Simple Machines Team

Tristan Perry

#2
Quote from: Metho on October 16, 2004, 03:29:07 PM
At the very bottom of Settings.php, before the ?> try putting ob_start();

- Methonis
Thanks for the prompt reply, I've done this, I'll see if it works  :) What exactly will it do? (I've read this but don't understand it 100%) Will there be any disadvantages to this?

[Unknown]

Try this... in Subs-Auth.php, find:

Find:
setcookie($cookiename, $data, time() + $cookie_length, $cookie_url[1], $cookie_url[0], 0);

Replace:
setcookie($cookiename, $data, time() + $cookie_length, $cookie_url[1], $cookie_url[0], 0);
setcookie($cookiename, $data, time() + $cookie_length, $cookie_url[1], '', 0);
setcookie($cookiename, $data, time() + $cookie_length, $cookie_url[1], 'www.fulldomain.com', 0);


Does that help?

-[Unknown]

Tristan Perry

Quote from: [Unknown] on October 16, 2004, 06:11:35 PM
Try this... in Subs-Auth.php, find:

Find:
setcookie($cookiename, $data, time() + $cookie_length, $cookie_url[1], $cookie_url[0], 0);

Replace:
setcookie($cookiename, $data, time() + $cookie_length, $cookie_url[1], $cookie_url[0], 0);
setcookie($cookiename, $data, time() + $cookie_length, $cookie_url[1], '', 0);
setcookie($cookiename, $data, time() + $cookie_length, $cookie_url[1], 'www.fulldomain.com', 0);


Does that help?

-[Unknown]
I'll see if it helps now.  :) Also on the last setcookie, what am I supposed to put under 'www.fulldomain.com' the forum, or the website? At the moment I have it set to 'http://www.tauonline.org' is this correct?
  Thanks a lot,
Tau Online.Org

[Unknown]


Tristan Perry

Thanks Unknown I've made that change. Also everyone has said they can logout not and view the members only page  :) Thanks for all your help,
Tau Online.Org

Advertisement: