![]() |
[solved]ionaut logout and login redirect problems - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: [solved]ionaut logout and login redirect problems (/showthread.php?tid=57327) |
[solved]ionaut logout and login redirect problems - El Forum - 03-07-2013 [eluser]Cgull[/eluser] Hello, I am using codeigniter 2.1.3 ionauth: benedmunds-CodeIgniter-Ion-Auth-0629c89 I have create a controller in a libraries folder: Code: class Admin_Controller extends MY_Controller Then I created a controller called dashboard that extends the Admin_Controller: Code: class Dashboard extends Admin_Controller In the login view I print the session and if the user is logged in I echo 'yes': Code: <h3>Login</h3> I have restarted my computer. When I go to: localhost/mysite/admin/dashboard: I go into the dashboard without loggin in. When I click the logout link: Code: <?php echo anchor('auth/logout', '<i class="icon-off"></i> Logout'); ?> I don't see any errors, and the ci_sessions table is empty. When I try to login with the right login details, the screen just goes back to the login screen. Why am I not logged out when pressing the logout link? And why when I login I am redirected to the login screen again? Thank you The solution: After hours of breaking my head, I realised php does not really connects to the database. I had WAMP installed on my machine and yesterday I decided to be brave and install php/apache/mysql manually following a tutorial I found online. Everything seemed to work fine but I guess it didn't. Installed WAMP again and everything is fine now. That'll teach me... ![]() |