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
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.
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 .