News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

SSI detecting logged in users problems

Started by torcado194, August 18, 2014, 10:28:29 PM

Previous topic - Next topic

torcado194

hey another question:

I set up a chat with SSI, php, and mysql and it works pretty much fine. the only thing that doesnt work correctly is the page detecting that you're logged in, or rather, it logs you out of the forums when you access it, or something.

Ive spent way too long trying to figure out exactly how to fix it so i thought id maybe get some pointers here.

I have found that in my forums, if you go to hxxp:www.domain.com/forums [nonactive] (location of my forums)("domain" replaces my actual domain, I don't really care about sharing it but for now ill keep it at that)
then everything works fine.
however, if i go to hxxp:www.domain.com/domainfolder/forums [nonactive]
all cookies(i assume) are screwed up and you are no longer logged in. going back to the first link shows you as logged in though.
so im guessing its seeing the 2 locations as different forums, though they are the same.

I'm using a shared hosting with a friend, and my domain is a subdomain of his, which has a folder in it that contains my entire website. clicking on any links on the site will bring you to the hxxp:www.domain.com/domainfolder/ [nonactive] version instead of just hxxp:www.domain.com [nonactive], though both reference the same file. This all has to do with server mod rewrites and .htaccess stuff and whatever, i spent hours trying to fix it and none of it worked so for now i just created a script that redirects you to the normal version of the URL

what this has to do with the chat may be just a coincidence, but i think not.

on my chat page, if the domain is hxxp:www.domain.com/domainfolder/forums/chat [nonactive]
it works for nobody (except me, which is even more confusing)
if the domain is hxxp:www.domain.com/forums/chat [nonactive]
it generally works for people, but occasionally someone will go to it and they will be a "guest" user. I've been able to manipulate it slightly but going back to the main forum page, making sure the URL doesnt contain the domain folder, then going back to the chat, and sometimes that works.

If anybody has any ideas on why this is happening, let me know. thanks!

Arantor

Admin > Configuration > Server Settings > Cookies and Sessions > Enable subdomain-independent cookies must be set up for cookies to exist outside of their normal folder.

Do you have two installs or something really strange going on? Since I don't normally see a reason for having both a folder and a subfolder that are, ultimately, the same thing, unless you're talking about subdomains anyway (in which case, there's usually bad voodoo coming out of it anyway)

torcado194

oh man! thank you that solved everything apparent so far! i wish i knew that sooner haha.

so no i dont have 2 installs, its just that in the server the site is with in a folder, and thats where the main index is, put going to that domain and adding the foldername after that still accesses the same file since technically the file is in that folder on the domain. its annoying but ill see if i can fix it another time.

but thanks again!

Kindred

Generally, that means a poorly configured host server...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

torcado194

#4
unfortunately it isnt my domain and i dont know the person who owns it enough to ask or change anything about it. its being hosted with godaddy. there have been many many posts on various sites about this same question with folder names in the URL. but ive spent so much time trying to get anything to work with it ive just given up at this point.

I tried changing the .htaccess 1 time on the root directory, which holds the folders (domains) for a bunch of other sites that aren't mine, and it broke them all for about 2 seconds. so i also do not want to mess anything up like that again.


Advertisement: