CodeIgniter Forums

Full Version: Random Logout Bug
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

Hi there,
Long time CI-user, but this is the first time I'm asking for help on the forums. I've just completed a web app I've been working on for the past 6 months, and here's what stopping from launching it.

For the login system, I use the Simplelogin library + OB Session. When I am testing the site on my localserver (i.e. localhost/webapp), it seems to work like it should and I don't come across any problems. However, when I deploy it to the main server (, for some reason a very weird bug kicks in in which whenever I'm logged in, I get logged out randomly and simply by clicking things and at random items. For example, I'll login, click oon ne of the links, it'll work, do it again, and the third time, I'm logged out and have to log back it.

Since this only happens to me on the test server, I've spent hours and hours trying to look for differences in behavior and things it does differently when it's working on the server, and so far I've found none. I've also done things like Ctrl + F "localhost/webapp" throughout the project to see if there are any absolute path perhaps where it only takes a specific action to the localhost server, and haven't found any. And lastly, I've changed the "cookie_domain" to be only the test server (, and that doesn't do a thing.

This is a bug which seems extremely, extremely weird to me. I have no idea what is causing it except for perhaps the session cookies acting differently when working on the test/actual server, but I don't know where this would be caused.

Also, just thought you should know, the random logout happens mostly and perhaps only when the links I click on links which are included in an iFrame (i.e. in a JQuery Thickbox window), and those links happen to have the following detection code to make sure the user is logged in:

if(!$this->session->userdata('logged_in')) {
    } else {

Can anyone please, please point me to the light?