Re: Handling sessions between servers?
| From: | Chris Lee | Date: | Tue, 18 Sep 2001 16:47:26 +0000 |
| Subject: | Re: Handling sessions between servers? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-67722@lists.php.net to get a copy of this message | ||
using mysql is an excelent choice, if your not using a db Ive seen people
pass the data raw
echo "
<a href='http://www.mediawaveonline.com/index.php?session_data=".
base64_encode(session_encode()) ."'>mediawaveonline.com</a>
";
then
session_decode(base64_decode($session_data));
its ugly, but it works.
--
Chris Lee
lee@mediawaveonline.com
"Josh Hoover" <Josh.Hoover@knowledgestorm.com> wrote in message
news:E973048AB322D411AE99009027E32DF685CD83@FRAZ...
> You can use NFS shares, but I've read that it is too slow for most
> situations. My suggestion would be to use a database and use a custom PHP
> session handler. A really good tutorial (including working code) on how
to
> write custom PHP session handlers utilizing a database can be found at the
> following URL:
>
> http://www.phpbuilder.com/columns/ying20000602.php3
>
> I've tested this code and it worked fine utilzing MySQL. You can apply
the
> same concepts to just about any datasource you want.
>
> Josh Hoover
> KnowledgeStorm, Inc.
> jhoover@knowledgestorm.com
>
> Searching for a new IT solution for your company? Need to improve your
> product marketing?
> Visit KnowledgeStorm at www.knowledgestorm.com to learn how we can
simplify
> the process for you.
> KnowledgeStorm - Your IT Search Starts Here
>
> > From: Michael Champagne [mailto:mchampagne@capis.com]
> >
> > Is it possible to handle sessions with PHP between separate
> > web servers? We
> > have 2 Apache servers and would like to share session data
> > between them. If
> > we keep the session data on an NFS mounted drive -- will this
> > work? Would it
> > be better to write custom session handlers to store session
> > data in a database
> > accessible from both servers? It seems like this should be
> > possible, but I'm
> > not quite sure how to go about doing it. Also, this is on 2 separate
> > platforms. One is RedHat Linux 7.1 and the other server is
> > on AIX 4.3.3.
> >
> > Thanks in advance for any replies,
> > Mike
>