Yes I am starting to realize it is not the code but rather a setting
somewhere that keeps resetting my session. I have no idea where to
being looking, however. I have set session security to low, changed it
from php to cake.. going to try db next but i'd rather not query the
db for all the sessions. but if it works, it works I guess. Thanks for
the input!



On Mar 21, 1:16 pm, John Andersen <j.andersen...@gmail.com> wrote:
> I just tried your bread crumb component, a little rewritten and the
> debug information presents the session content with the bread crumb
> information without problems! So have you done all the setting up
> before you use the component?
>
> Here is the bread crumb component with my changes:
> <?php
> class CrumbComponent extends Object
> {
>    var $components = array('Session');
>
>    function breadCrumb($newPageArray = null,  $reset = null)
>    {
>       $crumbs = $this->Session->read('Crumbs');
>       $crumbCount = count($crumbs);
>       echo $crumbCount;
>       $crumbs[] = array('crumb_link'  =>   $newPageArray
> ['link'],'crumb_name'    =>   $newPageArray['name'],);
>       $this->Session->write('Crumbs',$crumbs);
>       echo "<pre>";
>          debug($_SESSION);
>       echo "</pre>";
>    }}
>
> ?>
>
> In my controller I added:
>    var $components = array( 'Crumb' );
>
> And a place where I call it as:
>       $this->Crumb->breadCrumb(array('link'=>'somewhere
> link','name'=>'Somewhere I where!'));
>
> No problem, the information is there, so check your code! :)
> Hope this helps you on the way,
>    John
>
> On Mar 21, 7:50 pm, Charles <cri...@gmail.com> wrote:
>
> > Here is undeniable proof that the session is just not saving itself:
>
> > I set up two random names using rand(). I set ONE value using rand().
>
> >                 $name           = rand(7, 15);
> >                 $value  =       rand(5, 15);
> >                 $Sname  =       rand(1, 15);
>
> >                 $_SESSION[$Sname] = $value;
>
> >                 $this->Session->write($name,$value);
>
> >                 echo "<pre>";
> >                 print_r($_SESSION);
> >                 echo "</pre>";
>
> >                 debug($this->Session->read());
>
> > Yields:
>
> > print_r:
> > Array
> > (
> >     [15] => 5
> > )
>
> > Debugger:
> > Array
> > (
> >     [15] => 5
> > )
>
> > They should both have different names for the fields, yet they share
> > it. my sessions just don't save themselves.. someone please help!
--~--~---------~--~----~------------~-------~--~----~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to