RE: [PHP] Session in two servers
-Original Message- From: Philip Hallstrom [mailto:[EMAIL PROTECTED] Sent: Friday, April 01, 2005 7:43 PM You could modify your app so that upon the first request (randomly picked) the client will then continue to use that server until they quit their browser. That would break the whole idea of load balancing! Might not work for your situation, but it would get around the file/session issue... The solution is to have a common share that all servers in the LB scheme use for storing session variables. -- Med venlig hilsen / best regards ComX Networks A/S Kim Madsen Systemudvikler/systemdeveloper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Session in two servers
-Original Message- From: Srinadh Sannidhanam [mailto:[EMAIL PROTECTED] Sent: Friday, April 01, 2005 2:59 PM Hi, I am using sessions in my web application which is installed in two pawns. So the request is randomly picked by one of the two servers. I am using files in php session but not database. My problem is, if the first request go to one server and the session is created there, then for the following request going to other server will not have session. How can we manage the session simultaniously in two servers? Please help me in this regard. Do a print phpinfo(), this will most likely tell You that session.save_path is set to /tmp, that´s default. What You need is to mount the HD of server1 onto server2 and set this as the session.save_path. Have a look at for instance nfs mount, if You´re running linux. Remember to have a clean-up script running, if You choose another dir than /tmp or the session files will never be deleted. -- Med venlig hilsen / best regards ComX Networks A/S Kim Madsen Systemudvikler/systemdeveloper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Session in two servers
Hi, Thanks a lot for the information. I will try to mount that. Actually I thought of using database for session also but my client is not happy with that. Thanks any way. S.Srinadh. On Apr 1, 2005 6:39 PM, Kim Madsen [EMAIL PROTECTED] wrote: -Original Message- From: Srinadh Sannidhanam [mailto:[EMAIL PROTECTED] Sent: Friday, April 01, 2005 2:59 PM Hi, I am using sessions in my web application which is installed in two pawns. So the request is randomly picked by one of the two servers. I am using files in php session but not database. My problem is, if the first request go to one server and the session is created there, then for the following request going to other server will not have session. How can we manage the session simultaniously in two servers? Please help me in this regard. Do a print phpinfo(), this will most likely tell You that session.save_path is set to /tmp, that´s default. What You need is to mount the HD of server1 onto server2 and set this as the session.save_path. Have a look at for instance nfs mount, if You´re running linux. Remember to have a clean-up script running, if You choose another dir than /tmp or the session files will never be deleted. -- Med venlig hilsen / best regards ComX Networks A/S Kim Madsen Systemudvikler/systemdeveloper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Session in two servers
Hi, Friday, April 1, 2005, 10:59:13 PM, you wrote: SS Hi, SS I am using sessions in my web application which is installed in two SS pawns. So the request is randomly picked by one of the two servers. I SS am using files in php session but not database. My problem is, if the SS first request go to one server and the session is created there, then SS for the following request going to other server will not have session. SS How can we manage the session simultaniously in two servers? Please SS help me in this regard. SS S.Srinadh msession is designed for just your situation. http://www.mohawksoft.com/ -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Session in two servers
Hi, I am using sessions in my web application which is installed in two pawns. So the request is randomly picked by one of the two servers. I am using files in php session but not database. My problem is, if the first request go to one server and the session is created there, then for the following request going to other server will not have session. How can we manage the session simultaniously in two servers? Please help me in this regard. You could modify your app so that upon the first request (randomly picked) the client will then continue to use that server until they quit their browser. Might not work for your situation, but it would get around the file/session issue... -philip -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php