Using existing session data from a non-CI website in a CodeIgniter website |
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 |
Welcome Guest, Not a member yet? Register Sign In |