Today I struggled with dAuth to make it work as an element.

DAuth sets a random number in $this->Session->write('salt', $salt);
and when I read that key with $this->Session->read('salt'); after I
posted the form it was a different number then before the post. But
this was only when I called it from the controller /newsarticles/
index/, when I used the form in the controller /users/login/ the
number salt was right. So I figured somewhere in the /newsarticles/
index/ controller messes with session vars. After checking all the
code the thing messing up the session var was......

An <img>-tag referring to an non-existent image. :|

I don't know why it messes with the session, but it does so check your
view for any missing images or maybe other wrong hmtl tags.

Please let me know if this solves it for you.

On Jun 23, 4:26 pm, BoSc <[EMAIL PROTECTED]> wrote:
> why is that relevant? I do nothing with Sessions elsewhere, besides
> setting en trying to read them in my actions... the rest is just plain
> basics in the views... If it would really add something to this issue,
> I would ofcourse be more then glad to post them here.
>
> On Jun 23, 4:20 pm, majna <[EMAIL PROTECTED]> wrote:
>
> > Details like layout code, view code..
>
> > On Jun 23, 4:16 pm, BoSc <[EMAIL PROTECTED]> wrote:
>
> > > I'm sorry...
>
> > > But what more detail is there to give? I set a session variable, test
> > > if it is set by echo'ing it in the same controller, which works like a
> > > charm. But when I try to echo it from an other controller, it has been
> > > changed to something different. The funny thing is that it is set to
> > > the name of the favicon, favicon.ico. Because I was using a sort of
> > > generic name: last_visited, i tried changing it to somthing less
> > > obvious sadkj3423 or something, and that still results in the same
> > > session variable change.
>
> > > thanks
>
> > > On Jun 22, 8:01 pm, "John David Anderson (_psychic_)"
>
> > > <[EMAIL PROTECTED]> wrote:
> > > > On Jun 22, 2007, at 11:55 AM, BoSc wrote:
>
> > > > > anyone??
>
> > > > Please don't bump an issue without trying a different approach. Make
> > > > it more simple, supply more details. Something.
>
> > > > Thanks,
>
> > > > John
>
> > > > > On Jun 21, 11:07 am, BoSc <[EMAIL PROTECTED]> wrote:
> > > > >> Hi,
>
> > > > >> I'm currently figuring out sessions on my develop environment (XP,
> > > > >> Apache 2.0, PHP 5.0, newest Cake). Sessions don't seem to work
> > > > >> however,
>
> > > > >> I have a index inside a controller:
>
> > > > >> function index() {
> > > > >>  $this->Session->write('last_visited',$url);
>
> > > > >> }
>
> > > > >> which sets the url of the currect page (ofcourse the $url var
> > > > >> contains
> > > > >> the current url)
>
> > > > >> when I do:
>
> > > > >> function index() {
> > > > >>  $this->Session->write('last_visited',$url);
> > > > >> die(print_r($this->Session->read());
>
> > > > >> }
>
> > > > >> It shows the session with the current url (some/dir/goodpage), great
> > > > >> you would say.
>
> > > > >> but when I click a link on the index page, that should call some
> > > > >> controller function:
>
> > > > >> function delete() {
> > > > >>  $this->redirect($this->Session->read('last_visited');
>
> > > > >> }
>
> > > > >> it does not redirect me to the previously set url.. so i thought the
> > > > >> session wasn't saved, but after investigating:
>
> > > > >> function delete() {
> > > > >>  die(print_r($this->Session->read()));
>
> > > > >> }
>
> > > > >> the Session contains the set variable "last_visited" but the value
> > > > >> has
> > > > >> been changes to: (some/dir/favicon.ico/)
>
> > > > >> Anyone got an explanation?
>
> > > > >> thanks


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
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