Powered by Invision Power Board



  Reply to this topicStart new topicStart Poll

> issues with session write
auroramedia
Posted: Sep 22 2011, 06:37 PM
Quote Post


Newbie
*

Group: Members
Posts: 1
Member No.: 3153
Joined: 22-September 11



I need to save some system data as session variables...



function view($id = null)
{
$this->Session->write('design.did', '');
$this->Session->write('design.pid', '');
$this->Session->write('design.dname', '');
$this->Session->write('design.code', '');
$this->Session->write('design.model', '');
$this->Session->write('design.model_short', '');

// more scirpt follows that now sets the same session keys with relevant values
}

I use the initial block of code to reset the session variables before writing fresh values to them.

Strangely with this code, (or even if I use Session->destroy(key)), the new values that I assign later in the same function do not get saved.

When I remove that block of code, they do get saved.

This is very strange and I am not finding an explanation or a work around. I have set session save to database.

Looking for some ideas or suggestions.

PMEmail Poster
Top
cerzer40
Posted: Jan 6 2013, 07:46 AM
Quote Post


Newbie
*

Group: Members
Posts: 4
Member No.: 3742
Joined: 6-January 13



It's simple. I try to do and see.


--------------------
PMEmail Poster
Top
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:

Topic Options Reply to this topicStart new topicStart Poll

 

Disclaimer:
This forum is in no way affiliated with the Cake Software Foundation
The CakePHP name and icon is a trademark of the Cake Software Foundation


Lo-Fi Version