[Solved] changing session id and getting data

when i am setting session id i can’t get that session data.

How to get session data when changing session id?





Yii::app()->session->setSessionID($_POST['sessionid']);


$session_data  = Yii::app()->session->itemAt ('session_key');




i have figure out




$data = unserialize(Yii::app()->session->readSession($_POST['sessionid']));

....

Yii::app()->session->writeSession ($_POST['sessionid'], serialize($data));



Why would you ever want to change the session id?

This is because swfupload. SWFupload lose session id. i need to pass information back to my base application in session.

another way to change session id is




if ( ! Yii::app()->session->getIsStarted ()) {

    	Yii::app()->session->setSessionID($_POST['PHPSESSID']);

    	Yii::app()->session->open();

}



only need to set in config file




'session'=>array(

                	'class'=>'CHttpSession',

                 	'autoStart' => false,

            	),



In entry-script you can simply do


if (isset($_POST['PHPSESSID']))

{

   $_COOKIE['PHPSESSID'] = $_POST['PHPSESSID'];

}

Then the original session should continue.

yes it is more simplified thank you :)