CodeIgniter Forums
My app works fine in IE, not in FF or in CHROME - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: My app works fine in IE, not in FF or in CHROME (/thread-43786.html)



My app works fine in IE, not in FF or in CHROME - El Forum - 07-23-2011

[eluser]webnology[/eluser]
Hi all,

I get to the point where i can login (using tank_auth). But when I lcik login, and get redirected to the dashboard page of the app, it only works in IE. In FF and CHROME, I get a databse error on user_id, so I suppose the user is being logged out in the other browsers.

Any idea whay this could happen?

All help welcome,
Michel


My app works fine in IE, not in FF or in CHROME - El Forum - 07-25-2011

[eluser]webnology[/eluser]
Hi all,

just a reminder. Does anyone have an idea where I should be looking for this problem? Anyone had similar issues?

Regards,
Michel


My app works fine in IE, not in FF or in CHROME - El Forum - 07-25-2011

[eluser]webnology[/eluser]
It sometimes does not work in IE either. But if I empty the sessions table from the db, all works fine again in IE. Unfortunatelty it still does't work in FF.

All help welcome.

Thx,
M


My app works fine in IE, not in FF or in CHROME - El Forum - 07-25-2011

[eluser]LuckyFella73[/eluser]
Hard to say whats going on without seeing code - the first things I would check in config/config.php:
Code:
$config['sess_cookie_name']        = 'cookiename'; // No underscore here!

// and use this snippet (just now I don't remember who posted that):
$config['cookie_domain'] = ($_SERVER['SERVER_NAME'] == 'localhost' ? '' : preg_replace('/^www\./', '', $_SERVER['SERVER_NAME']));

I guess you use db sessions?!

No matter your browser is logged in or out you shouldn't get a DB error message when
using the tank auth library (or any other solution).


My app works fine in IE, not in FF or in CHROME - El Forum - 07-25-2011

[eluser]webnology[/eluser]
Hi Lucky,

it works! It looks like it has to do with the underscore in the cokkie settings. Any idea why that would be an issue?

Regards,
Michel


My app works fine in IE, not in FF or in CHROME - El Forum - 07-25-2011

[eluser]LuckyFella73[/eluser]
A while ago I read that the IE has problems with underscores in the cookie name.
There are a lot of posts where a session problem was caused by that.

Nice that the problem was an easy one and your app is running now Wink


My app works fine in IE, not in FF or in CHROME - El Forum - 07-25-2011

[eluser]webnology[/eluser]
Well, to be honest, I read those posts, but as in my case, IE was working and Safari, Chrome and FF were not, I didn't try that one. Stupid, I know. Maybe the standard setup of CI should then be without the underscore.

Anyway, thx for helping,
Michel


My app works fine in IE, not in FF or in CHROME - El Forum - 07-26-2011

[eluser]LuckyFella73[/eluser]
You are right - it's strange that a "bugfix" for IE works for
the other browsers ...

An other possible issue could be that the "user_agent" info gets
cut sometimes. The is/was such a bug in CI 2.0.2.

Here more infos about that:
http://code.philsturgeon.co.uk/ellislab/codeigniter-reactor/changeset/e3c9990d33bc

The userguide is not updated yet so it may be good to alter your session table
according to the mentioned problem [ "user_agent": varchar(50) => varchar(120) ].


My app works fine in IE, not in FF or in CHROME - El Forum - 07-26-2011

[eluser]webnology[/eluser]
Thx, but it had already 150 as length. So it looks like the problem was not because of that.

Michel