i have 2 web aplication using CI. the problem is every project sharing same session. i need every project to use different session.
Asked
Active
Viewed 183 times
2
-
On the same domain? – Jonnix Feb 27 '19 at 08:36
-
yes same domain. but different folder. like localhost/web1 and localhost/web2 – adam Feb 27 '19 at 08:38
-
Possible duplicate of [Same domain, different folder PHP session](https://stackoverflow.com/questions/5479626/same-domain-different-folder-php-session) (note that the accepted answer comes with a caveat in the comments.) – Jonnix Feb 27 '19 at 08:42
1 Answers
1
Try changing the sess_cookie_name
value in your configs (by default this is in application/config/config.php
).
Depending on your setup, you could be using the same store (database
/ redis
) or with the files
store the same sess_save_path
in both projects. If you separate the project by session cookie's name they should not collide anymore.
Alternatively you could change the sess_save_path
to an unique one for every project if you are using the files
driver

complex857
- 20,425
- 6
- 51
- 54