Re: Persisting Session Across Domains

2007-05-07 Thread rrogers

I actually encountered this recently myself, developing a cake
application.  After going about it in a real backwards way I found out
that sending the Session ID via a get var is one method:
http://us2.php.net/manual/en/ref.session.php

the way I did it was by serialize()ing the session contents and
putting them into a hidden input field (it was convenient since the
only bridge to the other domain was via a post) and then have the
other page pick it up and unserialize it and then set it.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



RE: Persisting Session Across Domains

2007-05-07 Thread Paul Webster
Thanks for your feedback John,
 
I of course already have my session's table up and running and sessions
set to database, no worries here. 
 
However this does not allow my sessions to persist across say
http://domain.com <http://domain.com/> , http://subdomain.domain.com
<http://subdomain.domain.com/>  and or http://domain2.com
<http://domain2.com/>  , all of which access certain areas of the
current (single) cake app. Are you implying cake should do so out of the
box (with db sessions in use)?
 
 
-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of John David Anderson (_psychic_)
Sent: Tuesday, 8 May 2007 8:55 a.m.
To: cake-php@googlegroups.com
Subject: Re: Persisting Session Across Domains
 
 
On May 7, 2007, at 2:08 PM, Paul Webster wrote:



I have a project with various areas accessible and only accessible via
certain domains sub domains etc. This was fine as it was a pretty simple
site just providing information with no need for logins etc, but of
course the site has currently evolved and now will be providing some
user options and the like requiring me to track site state.
 
So I understand the ins and outs of persisting sessions through storing
them in the db and like, was just wondering if anyone has tackled this
in cake and where they saw best to implement the code to do so?
Implement what code? Once you run the SQL to set up the table and adjust
your core config to use database sessions, you should be good to go. You
can create a model for your sessions table too, if you want, but that's
not much work either (especially if you use Bake).
 
-- John



__ NOD32 2245 (20070506) Information __

This message was checked by NOD32 antivirus system.
http://www.eset.com


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Persisting Session Across Domains

2007-05-07 Thread John David Anderson (_psychic_)

On May 7, 2007, at 2:08 PM, Paul Webster wrote:

> I have a project with various areas accessible and only accessible  
> via certain domains sub domains etc. This was fine as it was a  
> pretty simple site just providing information with no need for  
> logins etc, but of course the site has currently evolved and now  
> will be providing some user options and the like requiring me to  
> track site state.
>
>
>
> So I understand the ins and outs of persisting sessions through  
> storing them in the db and like, was just wondering if anyone has  
> tackled this in cake and where they saw best to implement the code  
> to do so?
Implement what code? Once you run the SQL to set up the table and  
adjust your core config to use database sessions, you should be good  
to go. You can create a model for your sessions table too, if you  
want, but that's not much work either (especially if you use Bake).

-- John
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Persisting Session Across Domains

2007-05-07 Thread Paul Webster
I have a project with various areas accessible and only accessible via
certain domains sub domains etc. This was fine as it was a pretty simple
site just providing information with no need for logins etc, but of
course the site has currently evolved and now will be providing some
user options and the like requiring me to track site state.
 
So I understand the ins and outs of persisting sessions through storing
them in the db and like, was just wondering if anyone has tackled this
in cake and where they saw best to implement the code to do so?
 
Any feedback much appreciated.
 
Paul 
 

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---