Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Questions and Supports (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=18)
-   -   Sessions not sticking (http://www.mysidiaadoptables.com/forum/showthread.php?t=4459)

Chimeric 04-10-2014 09:31 PM

Sessions not sticking
 
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?

Kyttias 04-11-2014 12:36 AM

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?

Chimeric 04-11-2014 10:22 AM

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. =)

Kyttias 04-11-2014 07:06 PM

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.


All times are GMT -5. The time now is 11:45 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.