CodeIgniter Forums
CI 3 native session driver? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=11)
+--- Thread: CI 3 native session driver? (/showthread.php?tid=62854)

Pages: 1 2


RE: CI 3 native session driver? - kilishan - 09-04-2015

(09-03-2015, 07:10 PM)blasto333 Wrote: Thank you for your input. I understand I can probably get one of these to work how I want to; but I don't see the harm in making a native session driver. I don't even think it would be too hard to write. This way you wouldn't have to deal with setting up file permissions (for the file driver; as long as php is setup correctly) AND it gives you the flexibility to use other session drivers that hook into php.


There probably isn't any harm in it. The files one is there because it duplicates the native driver with some additional security built-in, IIRC.

Since this is open source software, though, you're always welcome to create a new native session driver and submit a pull request. Smile


RE: CI 3 native session driver? - blasto333 - 09-07-2015

Looks like it was previously developed and then deleted from CI before release.

Could this be forward ported?

https://github.com/bcit-ci/CodeIgniter/blob/871754af60251993d640981e107d2def5f2db396/system/libraries/Session/drivers/Session_native.php

?


RE: CI 3 native session driver? - blasto333 - 09-07-2015

Here is another use case for native sessions. This forum talks about sharing session data between ci and non ci apps on same server

See
http://forum.codeigniter.com/thread-61385.html


RE: CI 3 native session driver? - mwhitney - 09-08-2015

(09-07-2015, 07:19 PM)blasto333 Wrote: Here is another use case for native sessions. This forum talks about sharing session data between ci and non ci apps on same server

See
http://forum.codeigniter.com/thread-61385.html

KCFinder's documentation explains how to integrate its use of sessions with other applications. Even if CI supplied a "native" driver, at best you would still have to make sure KCFinder was configured correctly to work with CI's sessions.


RE: CI 3 native session driver? - blasto333 - 09-08-2015

But even if it wasn't for KCFinder; I can see other use cases for sharing data between 2 applications where one might be CI and other is not.


RE: CI 3 native session driver? - mwhitney - 09-08-2015

Yes, and in all cases where 2 applications are sharing session data and attempting to control the session in any way, regardless of whether one is CI, you will be faced with the same issues. A careful developer with an understanding of how both applications access and manage sessions can make them do so if they're on the same domain, but there are so many potential problems with doing so that it shouldn't be recommended. In most cases it would be better to use different sessions in each application to store a value (like a user id) that can be used to lookup the necessary data in another storage mechanism (database, filesystem, etc.).