Session overwriting Session of another system |
[eluser]soprabaixar1[/eluser]
I have two systems I use CodeIgniter, but when I log into one it overwrites the data in the other session. I thought it could be config "sess_cookie_name", then changed one of them and did the test again, but it still fails. Code: $this->session->sess_destroy();
[eluser]soprabaixar1[/eluser]
Found a solution. Instead of using the code below: Code: $data = array( Use it at the beginning: Code: $this->config->set_item('sess_cookie_name', 'session_system_1');
[eluser]soprabaixar1[/eluser]
I was wrong, I did the wrong test ... the error persists.
[eluser]soprabaixar1[/eluser]
The two projects use CodeIgniter and are sharing the session. I do not want to share the session. http://ellislab.com/codeigniter/user-gui...sions.html
[eluser]Samus[/eluser]
why not just change the session cookie name per application? You can do that in application/config/config.php Code: $config['sess_cookie_name'] = 'ci_session'; // change this to something else
[eluser]soprabaixar1[/eluser]
Thanks, it worked. I do not understand why I can change some config session doing this: Code: $this->session->sess_expiration = 10800; // 3h But when I try to do the same for "sess_cookie_name" does not work.
[eluser]Samus[/eluser]
[quote author="soprabaixar1" date="1334354056"]Thanks, it worked. I do not understand why I can change some config session doing this: Code: $this->session->sess_expiration = 10800; // 3h But when I try to do the same for "sess_cookie_name" does not work.[/quote] Well I just changed my $config['log_threshold'] = 3; to display informational messages only and I noticed that the session class is initialized before the controller class. So that may be where your problem lies Quote:DEBUG - 2012-04-13 21:59:07 --> Config Class Initialized |
Welcome Guest, Not a member yet? Register Sign In |