View Single Post
  #6 (permalink)  
Old 07-02-2008, 06:21 PM
lspnet lspnet is offline
Junior Member
 
Join Date: Jul 2008
Posts: 3
Default

Quote:
Originally Posted by jweber View Post
I've not worked with a load-balancing environment, so I'm not sure how the web server handles distributing the PHP session file across the web servers in the farm, but I'd assume this is where the problem comes into play. In other words, if one request goes to one server, and a subsequent request goes to another server do the servers transfer the session file back and forth?
You are right on the mark. Session data will obviously not be there if a user makes a request from a different server. Apparently there is software out there to relieve this issue but:
1. It is expensive
2. It adds overhead
3. Why?

I mean if you could just use a cookie to check against a database, I can't think of why anyone would want to use such software in the first place.

I guess what's got me is in my older Session Class I always just generated a random token in a Session variable and checked it against a DB. I'm now starting to think the tutorial lead me a bit astray since random sessions ID's are already generated by PHP.

In any case, how does ZF handle sessions then? Does it still use a text file or does it use a custom storage handler?
Reply With Quote