View Full Version : sessions from sub.domains
Tryfwar
10-24-2003, 12:28 PM
A question which i've been trying to solve for some time now and must of been addressed by the developers of phpnuke and the like; how do you get a page thats in forums.domain.dom but being referenced by www.domain.dom to display the correct user session in WOL & not show as Guest?
For e.g.
i wish to display showmembers.php which resides in forums.domain.com via a page located at www.domain.com.
I can get the output of the page to work, but the page doesn't appear to be working with permissions and sessions correctly as it shows as a Guest viewing the page from Who's Online.
I have played around with the chdir() function and ensured that global.php is being loaded correctly, but it doesn't seem to like it. Is it because you cannot have cookies in more than one place? in which case i must force all cookies for forums.domain.com to be saved at www.domain.com? *conffused*
NTLDR
10-24-2003, 12:42 PM
You want the cookie domain to be .domain.com for it to apply to www.domain.com AND forums.domain.com
Tryfwar
10-24-2003, 12:46 PM
so you can specify more than one domain using AND in the list within CP Options ?
NTLDR
10-24-2003, 12:53 PM
No, you can only specify one domain, by entering .domain.com the cookies will have effect on the whole of domain.com including any sub domains.
Tryfwar
10-24-2003, 12:54 PM
err wait.. nm.. i have tried this before and it doesn't show still. Thanks for the reply though.
NTLDR
10-24-2003, 12:55 PM
Must be broken on your board then as it has allways worked correctly for me on vB2 and 3.
Tryfwar
10-24-2003, 12:57 PM
well my script is a bit strange... click on Rollcall --> www.mortalis.com
There is a reworked version of showgroups.php loaded into a div via javascript. I've tried placing the file in the home root but still makes no difference to WOL :(
NTLDR
10-24-2003, 01:05 PM
If your cookie domain is set to .mortalis.com then it should work, you'll probably need to logout and login again to get a fresh cookie.
Tryfwar
10-24-2003, 01:09 PM
It doesnt work at displaying anyone viewing the page. Every member browsing shows as Guest, so its not just my cookies.
However, when you view the page at its original location (not via a redirect) you appear in WOL: http://forums.mortalis.com/rollcall.php
NTLDR
10-24-2003, 01:39 PM
What about when you view it at: http://www.mortalis.com/forums/rollcall.php, do you appear as a guest then as well?
Tryfwar
10-24-2003, 01:52 PM
yes, hummm hehe
So JS not responcible like i was beging to think.
Let me try setting my cookie to www.mortalis.com and the path to /forums
Tryfwar
10-24-2003, 01:59 PM
Nope, tried it with www. and just .mortalis.com both with /forums/ and with /
No combo shows users browsing from the redirect. Only time i can see who is browsing the rollcall.php is when i am in the sub-domain forums.mortalis.com
Tryfwar
10-24-2003, 02:01 PM
Driving me nuts! i've tried tackling this problem before with just as much sucess :/ Its no real biggy though, just one of those things i wish i knew what was the source.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.