Home  |  Linux  | Mysql  | PHP  | XML
From:pmenier Date:Tue Jun 23 06:23:53 2009
Subject:Re: sharing PHP sessions between web servers using
NFS
> Hello,
> I have three web servers (in a lvs cluster)
> in the cluster they all think they are www.mydomain.com
> With LVS you can not guarantee that each request is going to come in
> via the same server
>
> I am trying to share php sessions between servers.
>
> I have seen some examples that use mysql for session, but i think this may work
> and would be easier to implement
>
> currently all three servers share the same file system via NFS
>
> so what i was going to do is change the path in the php.ini to
> session.save_path = "/mynfsmount/phpsessions". So essentially all
> three servers would write the session files in the same location.
>
> my concern is does anyone know how php creates the session ID
> the thing that concerns me is that i compared the current session
> directories on the 3 servers and there are duplicate file names. Do
> you think i can assume that PHP checks for the existence of the
> session file before it creates a new PHPSESSIONID??
>
> the one thing that would be ugly is if the servers overwrote the
> others files and sessions started getting messed up.
>
> Thanks for your help
>
>
>
>
Hello

You could take a look at memcached to store your sessions.

http://www.dotdeb.org/2008/08/25/storing-your-php-sessions-using-memcached/

Patrick



Navigate in group php.install at sever news.php.net
Previous Next


Your recent visits
configure created with buildconf does not show unknown options
RE: [PHP-WIN] What about php 5.3 and printers or PHP_PRINTER.DLL ?
RE: [PHP-WIN] What about php 5.3 and printers or PHP_PRINTER.DLL ?
RE: [PHP-WIN] What about php 5.3 and printers or PHP_PRINTER.DLL ?
RE: [PHP-WIN] What about php 5.3 and printers or PHP_PRINTER.DLL ?



  
© No Copyright
You are free to use Anything, but please consult your advocate before doing so as this website
also list content from other sources which may be copyrighted.
Site Maintained by Zareef Ahmed
Powered By PHP Consultants