Cakephp Session变量问题

I have 2 controllers, I am setting a session variable in one controller and trying to access it in the other.But its not taking the value I am assigning.

In the first Controller,

$this->Session->write('category',$id);
echo $this->Session->read('category');  //Outputs 17 which is correct

IN the Second controller,

echo $this->Session->read('category'); //Outputs images.jpg

I have checked,the session variable category is never taking a value of images.jpg.

It can be one of two things:

1) remember to load the session component in app_controller

<?php
App::import('Lib', 'permission/Permission');
class AppController extends Controller {
    var $components = array('Session');
}
?>

2) in the core.php file in the config folder you may have the session.start variable set to false

Configure::write('Session.start', true);

This variable says to autostart the session or not.

EDIT: I read wrong sorry, you are changing your variable somewhere try changing the name of the variable to categoryid or something like that, if it works it means that indeed you are changing it somewhere. If you are in linux do a grep -R "$this->Session->write('category'"