Using existing session data from a non-CI website in a CodeIgniter website |
I have two websites on the same server -
1) subdomain.mydomain.com where users log in. I setup a session cookie with domain as .mydomain.com 2) my second website is at mydomain.com which is a CI powered website and I got a plain php file at mydomain.com/plain.php In subdomain.mydomain.com/login.php I setup session cookie as PHP Code: session_name('mysess'); In http://mydomain.com/Plain.php PHP Code: session_name('mysess'); In My CodeIgniter website http://subdomain.mydomain.com/application/config.php PHP Code: $config['sess_driver'] = 'files'; Once users login at subdomain.mydomain.com I can see the session data at mydomain.com/plain.php without any issues but as soon as I view any page on mydomain.com/mycontroller/mymethod it overwrites the session data and I lose all the session data set after login at subdomain.mydomain.com I need that data to see that if a user is logged in or not. I don't want users to login twice that's why I setup cookie as above. What changes do I need to make in CI config to be able to get that data? |
Welcome Guest, Not a member yet? Register Sign In |