If you use plugins, you may have noticed that your app session data isn't avaialbe in your plugins and vice-versa. There's a good reason for that, as a plugin is intended to be a mini application, self contained etc.
In my case, this was a problem as my plugins are extensions or parts of my application and not seperate. To get around the wandering session data it was necessary to copy the session helper from cake/libs/controllers/components/ to /app/controllers/components and change this line in the constructor method:
<?php//$this->CakeSession = newCakeSession($base);$this->CakeSession = new CakeSession("/");?>
.. and in that way my session applies to everything under my app folder.











I think I prefer your solution ;)
("/myApp/")
great tip
Thank's
ini_set('session.cookie_path', '/mySubApp/');
in the plugins app_controllers before filter
function beforeFilter() {
if ($this->plugin && is_object($this->Session)) {
$this->Session->CakeSession->path = '/'; // or whatever You
want
}
}