Session Issue while coming from controller

Hi ,

We are trying to upload multiple files from the SWF.So when the fist file completed it's upload we are storing the value in session.



 			$session=new CHttpSession;

 			$session->open();

 			$tarray=array("Orignal"=>$cup->getName(),"Renamed"=>$new_date_filename);

 			$messagedata=$session["MessageAttach"];

 			array_push($messagedata,$tarray);

 			$session["MessageAttach"]=$messagedata;  

			

When the entire file upload is complete we are calling the components to update the DB .At that time I am checking the current user id through the session and getting the messagedata from the session.




        $session=new CHttpSession;

        $session->open();                        

        $user_id=$session["UserId"]; 	

        

But I cant able to get the session of user Id here.

If I am not storing the message data array in session I am getting the session of User Id.I am not sure whether I am doing wrong or whats the issue here.

Please help me on this issue.

P.S

I am using the YII version of 1.0.7

get the session like this ,


Yii::app()->session['MessageAttach']

http://www.larryullman.com/2011/05/03/using-sessions-with-the-yii-framework/

study link for [size="3"]using session with Yii[/size]

Just an off-topic info. Are you aware that Flash (SWF) is not available on Mac/Apple products?

You’re highly advised to drop the idea of Flash uploader and use some HTML5/Ajax/jQuery based. Or else, your page will not be fully usable on Apple products (your customers using these devices won’t be able to upload files).