FAQ
Using latest stable version 2.1.1:

Having this in the controller that is called first:

$this->Session->write('user', $uid);
$this->redirect('/home');

and this in HomeController:

var_dump($this->Session->read('user');

Problem: The session var in HomeController is no longer set. Instead,
a new session is created. Any idea why CakePHP looses the Session on
redirects?

I already set security level to low and checked cookie domain.
--

GrandCentrix GmbH
Lüderichstrasse 2-4
51105 Köln, Deutschland

Amtsgericht Köln | HRB 70119 | Geschäftsführer: R. Freygang, R. Rottmann,
M. Willnow | USt.-IdNr.: DE266333969

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

--

GrandCentrix GmbH
Lüderichstrasse 2-4
51105 Köln, Deutschland

Amtsgericht Köln | HRB 70119 | Geschäftsführer: R. Freygang, R. Rottmann,
M. Willnow | USt.-IdNr.: DE266333969

Search Discussions

  • Kanwal at Apr 20, 2012 at 10:15 am
    Have you added Session component in controller properly
    var $component=array('Session');

    On Apr 20, 2:52 am, Ralf Rottmann wrote:
    Using latest stable version 2.1.1:

    Having this in the controller that is called first:

    $this->Session->write('user', $uid);
    $this->redirect('/home');

    and this in HomeController:

    var_dump($this->Session->read('user');

    Problem: The session var in HomeController is no longer set. Instead,
    a new session is created. Any idea why CakePHP looses the Session on
    redirects?

    I already set security level to low and checked cookie domain.
    --

    GrandCentrix GmbH
    Lüderichstrasse 2-4
    51105 Köln, Deutschland

    Amtsgericht Köln | HRB  70119 | Geschäftsführer: R. Freygang, R. Rottmann,
    M. Willnow | USt.-IdNr.: DE266333969
    --
    Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
    Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


    To unsubscribe from this group, send email to
    cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
  • Vijay kumbhar at Apr 22, 2012 at 4:59 pm
    Hey,

    I have the same issue here. I am working on FB login with CakePHP 2.0
    & everything works perfect, but when i get the user details from FB &
    login that user to portal, Auth session gets created. But after
    logging in user get redirected to dashboard, between this the Auth
    session gets destroyed.

    Session component is already added to AppController.

    I tracked a lot...but no solution. Please help ..

    On Apr 20, 6:15 am, Kanwal wrote:
    Have you added Session component in controller properly
    var $component=array('Session');

    On Apr 20, 2:52 am, Ralf Rottmann wrote:






    Using latest stable version 2.1.1:
    Having this in the controller that is called first:
    $this->Session->write('user', $uid);
    $this->redirect('/home');
    and this in HomeController:
    var_dump($this->Session->read('user');
    Problem: The session var in HomeController is no longer set. Instead,
    a new session is created. Any idea why CakePHP looses the Session on
    redirects?
    I already set security level to low and checked cookie domain.
    --
    GrandCentrix GmbH
    Lüderichstrasse 2-4
    51105 Köln, Deutschland
    Amtsgericht Köln | HRB  70119 | Geschäftsführer: R. Freygang, R. Rottmann,
    M. Willnow | USt.-IdNr.: DE266333969
    --
    Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
    Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


    To unsubscribe from this group, send email to
    cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
  • Lowpass at Apr 24, 2012 at 7:10 pm
    Make sure that Auth comes before Session in the $components array. I
    don't know if that's still an issue but it was with older versions of
    Cake.
    On Sun, Apr 22, 2012 at 12:59 PM, vijay kumbhar wrote:
    Hey,

    I have the same issue here. I am working on FB login with CakePHP 2.0
    & everything works perfect, but when i get the user details from FB &
    login that user to portal, Auth session gets created. But after
    logging in user get redirected to dashboard, between this the Auth
    session gets destroyed.

    Session component is already added to AppController.

    I tracked a lot...but no solution.  Please help ..

    On Apr 20, 6:15 am, Kanwal wrote:
    Have you added Session component in controller properly
    var $component=array('Session');

    On Apr 20, 2:52 am, Ralf Rottmann <ralf.rottm...@grandcentrix.net>
    wrote:






    Using latest stable version 2.1.1:
    Having this in the controller that is called first:
    $this->Session->write('user', $uid);
    $this->redirect('/home');
    and this in HomeController:
    var_dump($this->Session->read('user');
    Problem: The session var in HomeController is no longer set. Instead,
    a new session is created. Any idea why CakePHP looses the Session on
    redirects?
    I already set security level to low and checked cookie domain.
    --
    GrandCentrix GmbH
    Lüderichstrasse 2-4
    51105 Köln, Deutschland
    Amtsgericht Köln | HRB  70119 | Geschäftsführer: R. Freygang, R. Rottmann,
    M. Willnow | USt.-IdNr.: DE266333969
    --
    Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
    Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


    To unsubscribe from this group, send email to
    cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
    --
    Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
    Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


    To unsubscribe from this group, send email to
    cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
  • Brad Koch at May 1, 2012 at 6:47 pm
    I encountered similar issues with session disruption while setting up
    OpenID using Cakebaker's OpenID component due to an arbitrary call to
    session_start. Probably not related to Ralf's issue, but that may be
    Vijay's problem. I've got it fixed in my fork of the openid component,
    https://github.com/kochb/openid-component, working on getting it pulled
    upstream.
    On Tue, Apr 24, 2012 at 3:10 PM, lowpass wrote:

    Make sure that Auth comes before Session in the $components array. I
    don't know if that's still an issue but it was with older versions of
    Cake.
    On Sun, Apr 22, 2012 at 12:59 PM, vijay kumbhar wrote:
    Hey,

    I have the same issue here. I am working on FB login with CakePHP 2.0
    & everything works perfect, but when i get the user details from FB &
    login that user to portal, Auth session gets created. But after
    logging in user get redirected to dashboard, between this the Auth
    session gets destroyed.

    Session component is already added to AppController.

    I tracked a lot...but no solution. Please help ..

    On Apr 20, 6:15 am, Kanwal wrote:
    Have you added Session component in controller properly
    var $component=array('Session');

    On Apr 20, 2:52 am, Ralf Rottmann <ralf.rottm...@grandcentrix.net>
    wrote:






    Using latest stable version 2.1.1:
    Having this in the controller that is called first:
    $this->Session->write('user', $uid);
    $this->redirect('/home');
    and this in HomeController:
    var_dump($this->Session->read('user');
    Problem: The session var in HomeController is no longer set. Instead,
    a new session is created. Any idea why CakePHP looses the Session on
    redirects?
    I already set security level to low and checked cookie domain.
    --
    GrandCentrix GmbH
    Lüderichstrasse 2-4
    51105 Köln, Deutschland
    Amtsgericht Köln | HRB 70119 | Geschäftsführer: R. Freygang, R.
    Rottmann,
    M. Willnow | USt.-IdNr.: DE266333969
    --
    Our newest site for the community: CakePHP Video Tutorials
    http://tv.cakephp.org
    Check out the new CakePHP Questions site http://ask.cakephp.org and
    help others with their CakePHP related questions.

    To unsubscribe from this group, send email to
    cake-php+unsubscribe@googlegroups.com For more options, visit this
    group at http://groups.google.com/group/cake-php

    --
    Our newest site for the community: CakePHP Video Tutorials
    http://tv.cakephp.org
    Check out the new CakePHP Questions site http://ask.cakephp.org and help
    others with their CakePHP related questions.


    To unsubscribe from this group, send email to
    cake-php+unsubscribe@googlegroups.com For more options, visit this group
    at http://groups.google.com/group/cake-php


    --
    Brad Koch

    Email: bradkoch2007@gmail.com
    Phone: 989-372-1212

    --
    Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
    Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


    To unsubscribe from this group, send email to
    cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
  • Mathias R at Jan 9, 2013 at 12:03 pm
    Hi,

    did you find any help with this problem. i have the same issue now.

    Greetings
    m.

    Am Sonntag, 22. April 2012 18:59:45 UTC+2 schrieb vijay kumbhar:
    Hey,

    I have the same issue here. I am working on FB login with CakePHP 2.0
    & everything works perfect, but when i get the user details from FB &
    login that user to portal, Auth session gets created. But after
    logging in user get redirected to dashboard, between this the Auth
    session gets destroyed.

    Session component is already added to AppController.

    I tracked a lot...but no solution. Please help ..

    On Apr 20, 6:15 am, Kanwal wrote:
    Have you added Session component in controller properly
    var $component=array('Session');

    On Apr 20, 2:52 am, Ralf Rottmann <ralf.rottm...@grandcentrix.net>
    wrote:






    Using latest stable version 2.1.1:
    Having this in the controller that is called first:
    $this->Session->write('user', $uid);
    $this->redirect('/home');
    and this in HomeController:
    var_dump($this->Session->read('user');
    Problem: The session var in HomeController is no longer set. Instead,
    a new session is created. Any idea why CakePHP looses the Session on
    redirects?
    I already set security level to low and checked cookie domain.
    --
    GrandCentrix GmbH
    Lüderichstrasse 2-4
    51105 Köln, Deutschland
    Amtsgericht Köln | HRB 70119 | Geschäftsführer: R. Freygang, R.
    Rottmann,
    M. Willnow | USt.-IdNr.: DE266333969
    --
    Like Us on FaceBook https://www.facebook.com/CakePHP
    Find us on Twitter http://twitter.com/CakePHP

    ---
    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+unsubscribe@googlegroups.com.
    Visit this group at http://groups.google.com/group/cake-php?hl=en.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcake-php @
categoriesphp
postedApr 20, '12 at 12:55a
activeJan 9, '13 at 12:03p
posts6
users6
websitecakephp.org
irc#cakephp

People

Translate

site design / logo © 2022 Grokbase