Hi, One of my websites has a strange problem. It kept logging me in AND out unexpectedly. Turns out that when I browse the website, or refresh a page, it switches between 2 sessionIDs - seemingly randomly. I printed them on the page along with other session vars. These appear and disappear as I see myself 'switched' between the two sessions. One minute I'm logged in with access, the next I'm not, then I am, and so on. I can log in for both sessionIDs and then it keeps me logged in on for both. When I'm logged in for one session and not the other, it switches between the two, taking all the session variables with it. When I'm not logged in at all, it still switches between 2 sessionIDs. This happens in FF and IE on both PCs in my house. I've tried clearing my cookies. I don't understand what on earth could be causing it. Any ideas? Thanks in advance for anything you have to say.
Sure it's possible. Somehow you are creating 2 session ID's for the same IP, The server doesn't know the difference, it is just doing as it is told. I suspect at some point you are creating a new session without closing the old one. Where are you creating the sessions? Can we see some code?
Thanks ST. I was having a poke round my code to see where this could be happening... but then I found it was also happening on other websites of mine. I found that all affected websites were on the same IP address. Sites on other IP addresses (but same hosting company) were not being affected. I think the host may be 'load balancing' - I don't fully understand but believe it involves sharing resources across a number of servers. In essence, one website is being served from 2 machines - each with it's own sessionID. For anyone else experiencing the same problem, this article on MSDN expands in more detail: http://msdn.microsoft.com/en-us/library/ms972338.aspx
No it's a small company in Belfast - and thankfully now they sorted it. Seemed reluctant to give any info about what happened thoug. Never used megahost - they're a bit evil?
PHP, nothing but PHP, Lots of bells and whistles. I guess they are allright, I am with godaddy right now. I understand how load balancing done badly could do that, probably though there is not enough load balancing to handle the traffic on thier servers, so your site is getting swapped so much that it can't keep up!