Posts: 74
Threads: 22
Joined: Oct 2013
Hello,
Sorry to be a pain Steven, but would you be able to point me to which file controls the order of authentication? This is still happening and fasthosts have drawn a blank
Many thanks again
Posts: 74
Threads: 22
Joined: Oct 2013
ok... update... had a server specialist look at this whole thing and they suggest it's due to load balancing. Which kind of makes sense -the site is on 2 separate servers and users will be served the site from either server depending on the load, they may also go from one to the other whilst browsing the site. This becomes a problem when they login and the script stores their session as a php session on the server itself, if they are flicked over to the other server the session is not there and they are asked to login again. This would normally be solved by storing the php sessions in the data base so they are there no matter which server the visitor is on. I take it something like this would be a very extensive rewrite so probably isn't in the roadmap?
Many thanks
Posts: 74
Threads: 22
Joined: Oct 2013
Posts: 2,894
Threads: 59
Joined: Jun 2010
Hi,
Thanks for letting me know about this. It probably explains why quite a few other people have had similar logging-out issues in the past.
Storing sessions in the database does appear to be an extensive change which I would like to avoid if possible, especially since I believe this to be a problem introduced (and therefore solvable) by the host. However I will definitely look into it over the next day or two to see exactly how feasible it is.
In the meantime I found a few links that you might find useful.
-
http://stackoverflow.com/questions/34808...rs#3480889
- (using memcached)
-
http://stackoverflow.com/questions/34808...rs#3481088
- (maybe there is a 'sticky sessions' feature that they can enable)
-
http://www.fasthosts.co.uk/knowledge-bas...cle_id=440
- (disabling load balancing could be another option)
Have
you completed
the interview?
Posts: 74
Threads: 22
Joined: Oct 2013
Yeah, unfortunately the 'business platinum' hosting package I'm on with fasthosts has load balancing built in but it's not removable, it's a fixed part of the package - I already asked =).
I'll pop them another mail and ask if they can enable sticky sessions but they're (understandably) reluctant to mess with servers that have live sites on them.
I'd have a go at tweaking the script myself but I know jack about MySQL and sessions
Thanks for the help though, and yeah, I really kicked myself that I hadn't worked out load balancing as the issue. D'oh!!
-Johan
Posts: 74
Threads: 22
Joined: Oct 2013
No joy - can't get them to do sticky sessions and memcached is a dedicated server-only option. Sod's law, I go for the most expensive 'business platinum' option hoping for the greatest flexibility and it's the only package that you can't disable load balancing on. Meh.
Posts: 74
Threads: 22
Joined: Oct 2013
Wow, am I impressed with Fasthosts now!!!!!!!! So after having been told twice by the tier 1 and tier 2 engineers that 'no can do', I did a little digging and found out they use F5 load balancing from a job ad of theirs. I then did some homework and found the documentation for them to enable sticky sessions. Jumped onto my twitter account which has 30k followers (hey I'm a marketing guy!) and after a
little 'discussion' over twitter someone at Fasthosts picked up my tweet and took up the case. End result is they're changing their entire business platinum hosting package and updating all the servers to now have sticky sessions... and they're doing all this by end of play today. How amazing is that?!!
Posts: 74
Threads: 22
Joined: Oct 2013
Yep, just to add final confirmation, this has completely solved the 'having to log back in all the darn time' admin logout issue. Very cool.
Posts: 2,894
Threads: 59
Joined: Jun 2010
Nice work in bringing it to their attention, and respect to them for fixing it quickly, although I was surprised it was configured like that in the first place. I'm sure this will help a lot of people. Most of all, glad to hear you can now stay logged in!
Have
you completed
the interview?