Re: Ajax and Sessions

2008-12-08 Thread JermWorm

Hmm, no one else having/had this problem?

In the meantime I've added the following to force a session start in
my beforeFilter:

if (isset($_POST[CAKE_SESSION_COOKIE])) {
session_name(CAKE_SESSION_COOKIE);
session_id($_POST[CAKE_SESSION_COOKIE]);
}
session_start();

It seems to work for now - but I'd still like to know why the session
isn't being started before my before filter in ajax requests but it is
being started before the before filter in normal requests.

Regards
Jeremy
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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
-~--~~~~--~~--~--~---



Ajax and Sessions

2008-12-07 Thread JermWorm

I'm trying to upgrade and app from an older beta of cake to RC3.

In my app_controller, I have a before filter that checks whether the
user is logged in via a session variable, but in the course of
debugging I've noticed that the session variable isn't there(i.e.
session not started?) when ajax requests are being processed, it is
there when normal requests are being processed, I set security in
core.php to low (it was on medium) with no difference, $helpers/
$components definetly includes 'Session'.

Am I missing something in the update I need to do I have looked
through the latest api/manuals but can't see why the session start is
being bypassed.

Regards
Jeremy
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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
-~--~~~~--~~--~--~---