Cakephp アプリでセッションを使用していますが、セットアップしたセッションが、使用しているさまざまなコントローラー間で共有されていないようです。だから私が持っているとしましょう
ページコントローラー
public $components = array( 'Email', 'Session', 'RequestHandler', 'Cookie');
//this is pages/home
public function home(){
$this->Session->write("bunny", "123456");
debug($this->Session->read("bunny"));
}
PersonController
public $components = array( 'Email', 'Session', 'RequestHandler', 'Cookie');
//this is person/index
public function index(){
debug($this->Session->read("bunny");
}
URL http://domian.org/person/indexにアクセスすると、そのデバッグ行は null です。「123456」と出力すべきではありませんか?