Welcome Guest, Not a member yet? Register   Sign In
Two websites using CI conflict, caused by session?
#1

(This post was last modified: 03-31-2020, 08:30 AM by kelapamuda.)

Hello. 
I just realize this, i curently working on 2 website using CI, and it looks similar because the second comes from the first one with modification client needs. All is all okey. But when i open in the same time, the website become strange , for example error php, or menu from web A is shown on web B, web A logout then the  web B become logout too. It happen in localhost and real server internet.  But when i open that two website in two different browser, it normal and doesn't act strange.

I googling and it says maybe from session conflict. Is it correct? And any ideas to solve the problem? Thanks.
Reply
#2

(This post was last modified: 03-31-2020, 11:01 AM by jreklund.)

Change your login cookie name. They can't have the same name, as both will load it.
Reply
#3

Yes, i try diferenciate that two website.
In config/config.php

$config['sess_cookie_name'] = 'ci_session_websiteA';
$config['sess_cookie_name'] = 'ci_session_websiteB';

And i think it works well now, thanks
Reply




Theme © iAndrew 2016 - Forum software by © MyBB