Help..Session always needs manual refresh to show correct session. - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Help..Session always needs manual refresh to show correct session. (/showthread.php?tid=53868) |
Help..Session always needs manual refresh to show correct session. - El Forum - 08-12-2012 [eluser]frochim[/eluser] Hi all... Currently i'm using CI 2.1.2 and store session using database. After successful login, login controller redirect to home controller and displaying another user session. If users press CTRL+F5 (manual refresh), it showing correct user session. Autoload Libraries: Session,Database Autoload Helper: Url Config Code: $config['sess_cookie_name'] = 'cisession'; Controller: Login Code: class Login extends CI_Controller Controller: Home Code: class Home extends CI_Controller View: Home Code: <html> Any suggestion? Thanks before, F.Rochim Help..Session always needs manual refresh to show correct session. - El Forum - 08-12-2012 [eluser]InsiteFX[/eluser] For one take the forward / off of your redirect to home. Help..Session always needs manual refresh to show correct session. - El Forum - 08-12-2012 [eluser]frochim[/eluser] Ok, i'll try. Thanks for fast reply. Help..Session always needs manual refresh to show correct session. - El Forum - 08-12-2012 [eluser]frochim[/eluser] @InsiteFX: I've took off the forward / and some of users still getting wrong session. My database is MySQL and engine for ci_session is InnoDB. Do i have to switch back to MyISAM for ci_session? Help..Session always needs manual refresh to show correct session. - El Forum - 08-12-2012 [eluser]InsiteFX[/eluser] The database engine should not matter. Try turning of the webpage caching for that page. Help..Session always needs manual refresh to show correct session. - El Forum - 08-13-2012 [eluser]frochim[/eluser] @InsiteFX: I'm sorry, what do you mean with turning of webpage caching? Do i have to set Code: $this->output->cache(5) Code: $this->load->view('home') Help..Session always needs manual refresh to show correct session. - El Forum - 08-13-2012 [eluser]InsiteFX[/eluser] Code: // change to what you need. This is just to see if you are having a webpage caching problem with your sessions. Help..Session always needs manual refresh to show correct session. - El Forum - 08-13-2012 [eluser]frochim[/eluser] @InsiteFX: Thanks for enlightenment, i'll try and reporting the result soon. Help..Session always needs manual refresh to show correct session. - El Forum - 08-13-2012 [eluser]frochim[/eluser] @InsiteFX: So far no users with wrong session after successful login. Thanks. What i've learned from this problem is everytime i want to show data from session i have to set of webpage caching to off. This session problem is solved. |