Hi fellow Cakers, I just finished Ajax-ifying my image battle hobby project. Two images are shown and the user is asked to select the best/most beautiful/etc. one. Two session variables are kept with the ID numbers of the images that are to be judged, to prevent cheating / multiple accidental clicks.
However, when writing to session variables in the '/images/battle' function when it's called by an Ajax request (to store the ID numbers of the next set of images), CakePHP starts a new session. It doesn't destroy the old one, but all previous data is lost (of course). I've tried switching session storage mechanisms. I'm using 'database', but it also happens in 'cake' and 'php' mode. I've also set the security to 'low'. I found some similar cases in the past, with https://trac.cakephp.org/ticket/3238 as the most recent. I've patched my session.php with the provided diff (since I'm already using a SVN checkout) and set CAKE_SESSION_SECURE_USER_AGENT to false, but to no avail. I'm still not sure if it's the same: that bug is about sessions being invalidated, but I'm not seeing that happening here after some debugging in session.php. It's as if Cake doesn't know a session has been opened already. If this is a bug, I'll report it in Trac. But I'd like to be sure before I do. Has anyone else experienced this? Greetings, Arjen --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to [email protected] 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 -~----------~----~----~----~------~----~------~--~---
