Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Session issues
  • I've got problems with session on my hosting. When I use Session class, on localhost - everything works great. But after transfering project to my hosting - sessions get crazy (they work only when they want, can't find logic in this). It's propably connected with server configuration. Any ideas? Any help? Where should I looking for solution? Best regards
  • Start by defining "crazy". And tell us what kind of session config you are using.
  • Usually sessions just don't work on hosting. But sometimes (for example, when I use Debug::dump()), they wake up.
    I'm using default session settings (cookie).
  • When cookies don't work, it usually down to poor definition. Modern browsers are very strict on RFC compliance, and poorly configured cookies, to deal with the security risks related to them. Start debugging (with for example firebug). When you do a page request, is the session cookie send back to the browser with the answer? Does the browser store the cookie? When you do a second request, is it send back to the server? If that mechanism doesn't work, you have to fix that first. If that does, you can start looking server side. I have never had a single issue with sessions, I don't know where you get the idea that "Usualy sessions on hosting don't work"...
  • I forgot to add "on that specific hosting". It's strange, because on localhost and my another hosting, sessions work perfect :S Anyway, thanks for advices, I'll try check this with firebug.
  • Ok, there is something wrong with Sentry package, not the sessions :S
  • Ok, this is really weird. When I add: Session::set_flash('test', 'aa');
    echo Session::get_flash('test'); Before login process via Sentry, it works ...
  • Which version of FuelPHP are you using? There was a bug in v1.1 that would cause the session not to be created if it was empty, which could cause this behavior. This has been fixed (about a month ago) in v1.2 .
  • I'm using FuelPHP v1.2
  • Ok. And do you autoload the session class (in your config/config.php always_load section)?

Howdy, Stranger!

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

In this Discussion