Re: [PHP] Keeping sessions



Ok, you both are right but not what I need because web servers is for shared hosting with PHP then each user choose the way to develop their apps. Then one user maybe store sessions in DB but another one not. This should be on Apache or OS side. It's because I talk about ldirector, LVS and so

I know this is a PHP and not an Apache list but maybe someone is doing this with web hosting...

cheers!

Stut escribió:
Richard Heyes wrote:
Stut wrote:
Jorge González wrote:

In a web server cluster, how do you do guys keep the php sessions? I mean, with Apache and mod_proxy_balanced you could have a cluster with apache backend webservers but If a user is logged into an php app then this user goes always to the same backend server and if that server goes down then the session is invalid.

How to deal with sessions?

Several options exist, but the most common is to store session data in a database that can be accessed by all of the web servers. Alternatives include using memcached but recently I read something that suggested that can be problematic.

I believe the cluster support in Zend Platform includes this functionality, so depending on your budget that may also be an option.

Just a note: you could have either one of the web servers acting as the "session" server which the other web servers use or, if need be, a dedicated "session" server. I wouldn't imagine you'd need that though unless your site's really busy.

What do you mean by "session server"? How are you accessing the session data on another server?

-Stut



Relevant Pages

  • Re: Session variables are lost, disappear from page to page
    ... MS Windows Server 2003 ... says 'edit records' and 'delete records'. ... the data in the session array is gone. ... I think it's a PHP bug, but PHP support won't acknowledge it as a bug, ...
    (comp.lang.php)
  • Re: Session variables are lost, disappear from page to page
    ... MS Windows Server 2003 ... says 'edit records' and 'delete records'. ... the data in the session array is gone. ... I think it's a PHP bug, but PHP support won't acknowledge it as a bug, ...
    (comp.lang.php)
  • Re: RWW Timing
    ... I understand that you want to monitor when and how ... > to an internal Windows XP or Terminal Server computer. ... SBS creates a connection to the internal client on port 3389 which is ... But it can not tell which one session from the RWW, ...
    (microsoft.public.windows.server.sbs)
  • Re: Restricting TS USers
    ... MCSE, CCEA, Microsoft MVP - Terminal Server ... Terminal Services and Microsoft Windows Server 2003 Service Pack ... the remote session does not end immediately. ...
    (microsoft.public.windows.terminal_services)
  • Re: PHP/Apache or IE problem (no GPC data)
    ... not really about PHP but this is the best ... we get complaints from our customers about them losing their session. ... 20 times per 200k hits (one day's work per server). ... Still I saw http hits without any get/post/cookie data, ...
    (comp.lang.php)