Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Auth session being interrupted by Session::set()
  • Hi!
    I'm working on an application in fuelphp and I am having few problems with the Auth controller. After the login, I'd like to add some information to the Session by calling `Session::set('foo', 'bar')`. However doing this somehow deletes the auth session and the user cannot do anything. Is this a bug?

  • HarroHarro
    Accepted Answer
    No, and I've never seen that behavior.

    You're not overwriting the session variables that Auth creates? Our using cookie based sessions, and making your session payload to large?
  • I've thought of that and therefore changed the name, but it didn't help. 
    Here is the actual code of the controller. The login part is just copied from the examples and, after the login it should set the session variables, but somehow it also breaks the auth session.
  • Finally, I found the reason of this behaviour. The Session cookie was too large for the cookie driver. It works just fine with a file driver. Anyway thanks for your time and answer. I love the FuelPHP project.
  • Cool you got it solved.

    Any idea how large the cookie was? The cookie driver should throw an exception when the cookie is to large, but it's a bit guess work when you encrypt the cookie payload, as that creates a variable length string...

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion