I am experiencing a similar issue, but a more subtle one.  The
solutions provided in the links do not help.  I've tried them all.

Here's what I'm trying to do:

I keep an array of the last 10 URLs on my site the user has visited in
the session variable 'urlBackTrack'.  With every page the user lands
on, in beforeRender() in app_controller, I add the current URL to the
first array entry ( key [0] ) or this variable, like so:

$urlBackTrack = $this->Session->read('urlBackTrack');

array_unshift($urlBackTrack,$this->here);

$this->Session->write('urlBackTrack', $urlBackTrack);

The problem I have is that for some pages, this process works fine.
But for other pages, when I debug the array, it shows that the current
URL was successfully added, but then when I move onto another page
through the site, that new array ( key [0] ) entry is now gone, as if
it wasn't written at all.

I am also checking the session id ( $this->Session->id() ) and it is
the same throughout the site.

I've changed the security level to low and medium, I set
checkUserAgent to false, etc, etc.  What am I missing?



On Jun 10, 10:38 am, Andrew Assarattanakul <[EMAIL PROTECTED]> wrote:
> Check a few of these discussions as a few other people have had this
> issue and resolved it.
>
> http://groups.google.com/group/cake-php/browse_thread/thread/c4b30b02...http://groups.google.com/group/cake-php/browse_thread/thread/b173577d...
>
> On Jun 10, 5:20 am, koko <[EMAIL PROTECTED]> wrote:
>
> > Anybody found a solution to this  ?? I am having the exact same
> > problem here !!
>
> > On May 21, 5:25 am, Ozzy OG Kush <[EMAIL PROTECTED]> wrote:
>
> > > Hey,
>
> > > I am having this same exact problem! I'm using CakePHP 1.1.19.6305 .
>
> > > This is very frustrating! Any help would be very appreciated.
>
> > > On Apr 23, 11:45 am, creationsings <[EMAIL PROTECTED]> wrote:
>
> > > > Did you ever find a solution to this?  I think I am experiencing a
> > > > similar problem.  I can write to asessionvariable, but I can only
> > > > read the valid value if I do so before the action completes.  Once the
> > > > action completes and a new one is called, thesessioninformation is
> > > > gone.  I am extremely new to cake and would love to know the solution.
> > > > Thanks!
>
> > > > On Apr 17, 3:03 pm, Ramiro Araujo <[EMAIL PROTECTED]> wrote:
>
> > > > > I still have not succeded in this... The strange thing is that im
> > > > > using the Auth component, and im pretty sure It usessessions. What I
> > > > > dont know if it uses them with $_SESSION or with thesession
> > > > > component, but I would bet for the second.
>
> > > > > Quite strange.. I'll try in other cake instalations around and see.
>
> > > > > On Apr 15, 10:38 am, Ramiro Araujo <[EMAIL PROTECTED]> wrote:
>
> > > > > > Hi, thanks! here it is:
>
> > > > > > Configure::write('Session.save', 'php'); //also tried with 'cake'
> > > > > > Configure::write('Session.cookie', 'CAKEPHP');
> > > > > > Configure::write('Session.timeout', '120');
> > > > > > Configure::write('Session.start', true);
> > > > > > Configure::write('Session.checkAgent', true); //also tried with 
> > > > > > false
> > > > > > Configure::write('Security.level', 'low');
>
> > > > > > Right now im asigning with $_SESSION and reading withSession
> > > > > > Component :D hahahah
>
> > > > > > Thanks for the help!
>
> > > > > > On Apr 14, 3:58 pm, "b logica" <[EMAIL PROTECTED]> wrote:
>
> > > > > > > How is your core.php configured? Post what you have for all
> > > > > > > Configure::write('Session.*', '...') and whether they are 
> > > > > > > uncommented
> > > > > > > or not.
>
> > > > > > > On Mon, Apr 14, 2008 at 1:35 PM,RamiroAraujo <[EMAIL PROTECTED]> 
> > > > > > > wrote:
>
> > > > > > > >  Hi. Im having a strange problem, and couldn't find any 
> > > > > > > > solution or
> > > > > > > >  anyone with a similar problem... Its quite simple:
>
> > > > > > > >  same controller, 2 methods:
>
> > > > > > > >  function sessionWriteTest ($key, $value) {
> > > > > > > >         $this->Session->write($key, $value);
> > > > > > > >  }
> > > > > > > >  function sessionReadTest ($key) {
> > > > > > > >         debug($this->Session->read($key));
> > > > > > > >  }
>
> > > > > > > >  doesnt work...
>
> > > > > > > >  modifying the method sessionWriteTest like this, works:
> > > > > > > >  function sessionWriteTest ($key, $value) {
> > > > > > > >         $_SESSION[$key] = $value;
> > > > > > > >  }
>
> > > > > > > >  Am Imissingsomething really simple? My config is set quite 
> > > > > > > > default,
> > > > > > > >  temp directories are chmod 777, and normalsessionhandling 
> > > > > > > > works!
>
> > > > > > > >  Thanks!

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to