473,325 Members | 2,872 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

sharing sessions across servers

Hi,

I was wondering if some one would be able to help me with this. I am
trying to share a session across two servers and I seem to be
experiencing some problems. I was wondering if anybody has already
tried something like this before and hence be able to provide some
guidance in this regard. Any suggestions, pointers or redirections to
useful links is welcome.

Thanks in advance for your help,
Meghna
Jul 17 '05 #1
1 6137
> Hi,

I was wondering if some one would be able to help me with this. I am
trying to share a session across two servers and I seem to be
experiencing some problems. I was wondering if anybody has already
tried something like this before and hence be able to provide some
guidance in this regard. Any suggestions, pointers or redirections to
useful links is welcome.

Thanks in advance for your help,
Meghna

This is where I have tho most fun, working on sites that scale, mostly
across several servers. Some poeple would say use a back end database, and
some form of cookies. Well, this is good, probably a better way.

But, here are my quick solutions.

Either get a 3rd server, that sits behind both front end servers, and both
servers pull user data from it,
by maping a shared directory between the back end server and the two
servers,

server 1 and 2, have a directy, like this
/www/yourdomain/directory/_userdata

but it is actualy a directy on the 3rd server called something like this
/www/shared/_userdata

or

have one of the two servers store the data, then map a shared directory
between the two servers,
server 1 has a directory called
/www/yourdomain/directory/_userdata

and server 2 has a directory called
/www/yourdomain/directory/_userdata
but this directory is actualy a directory on server 1
now, after you have all that,

save a uniq filename as a cookie to the user, along with user id etc,
validation cookies, etc..

then when you need the psuedo session information, just load it off a file
with a simple

include("/www/yourdomain/directory/_userdata/filename")
if you go to http://gzen.myhq.info/snippetview.php?v=var-to-file.php I have
an example of how to save an array to file and read it back, its only a few
lines

--
Mike Bradley
http://gzen.myhq.info -- free online php tools

Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Rob Meade | last post by:
Hi all, At work we have 2 servers in a cluster for our web apps. One problem we have experienced (along with many others!) - is that if a user is logged into one of the applications on server...
4
by: Daniel | last post by:
Hi I am having a problem sharing session between SSL and non-SSL asp.net pages I have F5 BigIP with sticky sessions working fine, but the problem is tha sticky session applies at the port level...
10
by: Suresh | last post by:
how to share Session Sharing Across the domain
2
by: Chris Fink | last post by:
What is the recommendation for sharing master pages across IIS Servers? In our corporation, we have many webservers in different environments (intranet, extranet, etc). I've done some searching,...
1
by: AnthonyC | last post by:
I am having a problem tracking down what I believe to be a problem with the way cookies are being used on our website application. When user log onto the application, an in-memory (per-session)...
7
by: Nils Hedström | last post by:
I have a web farm that uses a state server for session management. A user logs on to a website (www1.mysite.com). When the same user visits www2.mysite.com I want the user to be logged in. Right...
3
by: Ben Holness | last post by:
Hi all, I have a php/mysql website where people can upload their own graphics for the buttons and background of pages on the website. This used to run on one server, but I have now been asked...
11
by: Max Vit | last post by:
I have deployed few Access apps splitting it in Front End and Back End. Our environment uses Win XP SP2 for clients, Win 2k3 for servers and Access 2003. The max. number of clients is about 50...
9
by: Gilles Ganault | last post by:
Hello Some data are common to all user sessions, and to improve performance/save resources, I'd like to share those data between all sessions, so that each user doesn't have to hit MySQL for the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.