Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cakephp After redirecting session is not working in Live server

I am using cakephp 2.0 in My Users controller i am setting a SESSION in login action using

$this->Session->write('Users',$value);

once session set it will redirect to next action named home. In login action its working I logged and checked the value, but after the redirect I read the session value by using the following in home action

$this->log($this->Session->read('Users'));

nothing displayed. But its working fine in local server.

like image 353
AnNaMaLaI Avatar asked Dec 13 '25 16:12

AnNaMaLaI


1 Answers

Please check the following things on your server.

  • Check your php.ini file whether session is enabled or not.
  • session.cookie.domain is set to your server or not.
  • Check for your php files having any blank lines after ?> if any please remove.

And then try.

like image 83
Vins Avatar answered Dec 16 '25 19:12

Vins