I have the following code in yii
$identity=new UserIdentity($username,$password);
if($identity->authenticate())
{
Yii::app()->User->login($identity);
$this->redirect(array('site/index'));
}
else
{
}
It works fine on XAMPP in Windows environment. But when i test it in Mac OS it gives the following error
session_regenerate_id(): Cannot regenerate session id - headers already sent
Can anyone explain why this is happening and fix the problem?
Thanks in advance