Welcome Guest, Not a member yet? Register   Sign In
session cookie firebug problem
#1

[eluser]Unknown[/eluser]
Hi,
I am working on a project recently and I've encountered on strange bug with sessions. The session seemed to expire randomly. Sometimes logging me off after few seconds, sometimes after ten minutes and even when I turned on any logging possible I could not find out what can cause it.

But at last, I did it, I found a source of the problem. It is the firebug console (actually it seems to be only problem with firebug, chrome console is fine), When I log in and have my console on and when I turn off the console and reload the page (or do something that checks the session validity) the system logs me out. And it works conversely: firebug off > log in > firebug on > action > and system logs me out. Thanks to message logging I even manage to find out that problem is, that when I change the state of firebug, the system simply stop seeing the cookie. And now, even though it is not a critical problem (unless my clients use firebug), I would like to know how to prevent this bug, so I can test the system alltogether.

And I have another reason to put it here: it was pretty crazy to find out that the culprit is the firebug, so I want this problem to be known Smile
#2

[eluser]PravinS[/eluser]
You can check any open console in browser using javascript and can give alert to close the firebug. You can use this code.

if(window.console && (window.console.firebug || window.console.exception))
{
alert("Please close console");
}

may this will help you.
#3

[eluser]Giords[/eluser]
I think I had the same problem and it was driving me crazy. I investigated a bit more, and found that it was, in fact, related to FirePHP (not FireBug itself).

In my config file, I had sess_match_useragent set to true. FirePhp changes the useragent, so for example it goes from:

Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20100101 Firefox/15.0.1

to:

Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20100101 Firefox/15.0.1 FirePHP/0.7.1

which would invalidate the session.

It would also happen if you had FirePHP active to test your website, then started using a different tab where FirePHP was not active, and while doing that your website did an ajax request or something.

Really annoying, but if you set sess_match_useragent to false, you can happily continue using FirePHP.




Theme © iAndrew 2016 - Forum software by © MyBB