Welcome Guest, Not a member yet? Register   Sign In
Using existing session data from a non-CI website in a CodeIgniter website
#10

(This post was last modified: 09-23-2017, 12:00 PM by skunkbad.)

Copy and paste the method into your custom session class, and call it before you call session_set_save_handler. You'll need to add the $_sid_regexp member at the top of your class.

If you browse through CodeIgniter's Session.php file, you'll see everything that was done, and when you research all that was done you'd never been attempting to use plain PHP sessions without doing all that stuff. A lot of what's going on is all security related, and if you don't do it right then you for sure don't want to be authenticating people on that session.

For my own use, I made a session class with kind of a mix between CodeIgniter's Session.php and Symfony's PDOSessionHandler. It's only for database sessions, but it might give you some clues as to how you can work with CodeIgniter type sessions outside of CodeIgniter: https://bitbucket.org/skunkbad/php-db-sessions
Reply


Messages In This Thread
RE: Using existing session data from a non-CI website in a CodeIgniter website - by skunkbad - 09-23-2017, 11:58 AM



Theme © iAndrew 2016 - Forum software by © MyBB