Sessions not sticking

Forum
Last Post
Threads / Messages

Chimeric

Member
Member
Joined
Apr 9, 2014
Messages
2
Points
0
Mysidian Dollar
0
Hey there,

I combed the forums for an answer to this issue but nothing seems to be working.

I'm running XAMPP at my current workstation, and I've just installed a fresh copy of v.1.3.4. The install went smoothly, but sessions don't appear to be working. I'll login, and immediately I'm logged back out - I can't navigate to admin CP or to user CP. I tried registering a new user but to no avail - the moment I navigate away from the page I'm no longer logged in.

Apache, MySQL, Mercury and Tomcat are all enabled. I double-checked my browser cookie settings - also enabled. There's no error being generated, and sessions are clearly being written to the database (I cleared the field and tried logging in again - a new session identifier was written to the field so that's not the problem), they're just not... sticking.

Any insight?
 
Since you're working locally, it's worth asking whether you're approaching your site with 'localhost' or '127.0.0.1' through the browser? Does this behavior occur in both?
 
Great question - it appears to work just fine on '127.0.0.1' . I'm in such a habit of using localhost that I never even thought to check that.

Thanks - any idea why that would be? It probably won't matter in a live environment but it'd be interesting to know why that makes a difference. =)
 
I don't know why it is, but I've noticed the exact same behavior with my local setup. I think it has to do with how it's taking to poll the database/how its connecting? One way it bounces through your computer and back only (localhost), the other it hits your local network (something to do with TCP?) and then bounces back (the IP). I've also heard that doing it via IP works faster.

But I think it actually comes down to how MySQL treats incoming connections (and it even does so differently based on what OS it was installed on). If you installed a site one way, and access it the other way, thinking it would read the same internally, you'd be surprised. The session data will think localhost is a completely different access point than 127.0.0.1, so the session won't carry over. In fact, if, when you log in via localhost, does the address bar change to 127.0.0.1 and then act like you never logged in? Mine does. And I think this is because I had to install Mysidia under 127.0.0.1 because it wouldn't accept localhost? I've had a few other frameworks I've installed which present the same mystery issue.

I think this might be some relevant further reading.
 
Similar threads
Thread starter Title Forum Replies Date
Tequila Sessions Street: Spooky Wood Templates and Themes 24
Tequila Themes by Sessions Street Templates and Themes 38

Similar threads

Users who are viewing this thread

  • Forum Contains New Posts
  • Forum Contains No New Posts

Forum statistics

Threads
4,277
Messages
33,119
Members
1,602
Latest member
BerrieMilk
BETA

Latest Threads

Latest Posts

Top