Session (ci, native, db, what ?) - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Session (ci, native, db, what ?) (/showthread.php?tid=2042) |
Session (ci, native, db, what ?) - El Forum - 07-12-2007 [eluser]sikkle[/eluser] Hi, This thread will maybe help some newbie like me Lately i take time to read barely 90% of the documentation, UserGuide, Wiki etc. This will apear weird but something keep being "mysterious" to me. SESSION. Quote:PHPSession: I understand for anyone who got enough skill, those explanation is enough. i'm still not able to understand what is the best to use if you control 100% of your dedicated server. I'll be happy to listen what solution people use, and more WHY ! Thanks a lot for people who taking time to give a minute for this. Session (ci, native, db, what ?) - El Forum - 07-17-2007 [eluser]Phil Sturgeon[/eluser] These are all just various different ways of storing session variables. CI uses a library that either uses $_SESSION or inserts them into a database temporarily. Some of these are extensions to the native class and some are just replacements with some snazzy extras. From reading through the descriptions it sounds like OB Session is the best as it not only allows you to control timeouts, auto-regeneration and other things, but you can make it use cookies or database storage which is a little more useful than good old sessions. Session (ci, native, db, what ?) - El Forum - 07-19-2007 [eluser]sikkle[/eluser] many thanks for this response, this is weird to didnt get any response from what people use and why Time consuming i presume Session (ci, native, db, what ?) - El Forum - 07-19-2007 [eluser]Rick Jolly[/eluser] IMO, an ideal session library would use php native sessions with database storage and cookie-less sessions when the client won't accept cookies. I like php native sessions because: - only the session id is stored as a cookie on the client's computer. - headers are added that allows IE to accept the cookie when security is set on high. - a common api that can be used for any php application (not just CI) so it is cross-platform. I like database storage because: - it will work on distributed servers so it is scalable. - you can easily query your database to find info about current logged in users. For example, how many users are currently logged in. I like the option of cookie-less sessions (session id passed in the url) because: - I've had clients behind a corporate firewall that won't accept cookies. Unfortunately there are no CI libraries that have all these capabilities. Not one supports cookie-less sessions. Native Session is a nice simple library. It adds flash data and session regeneration, but you have to use the CI methods instead of accessing the $_SESSION array which I find a bit more awkward. OBSession is the most complete. When configured appropriately it will store the session id as a cookie and the rest of the data in the database. One drawback is that it sets the session id as a regular cookie as opposed to a native session cookie. That means that it will not work in IE if security is set to high. Session (ci, native, db, what ?) - El Forum - 07-19-2007 [eluser]sikkle[/eluser] This is so this! Many thanks for those comment. |