Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Login session expires immediately in Firefox, but works fine in Chrome

I am using Facebook api and Laravel for my site. The site works fine in Chrome, but sometimes in Firefox the session expires immediately after login.
I am not sure what's causing this problem. I checked the Firefox cookies, the Laravel session and phpsession id exist.

like image 651
winnyboy5 Avatar asked Oct 31 '22 04:10

winnyboy5


1 Answers

The first thing that comes to mind is : Cookies

You already checked the cookies; but, have you verified that they are not corrupted?

Aside from cookies, here are a few reasons why this is happening :

(a) The date on your computer is set incorrectly. Since cookies rely on dates, a computer with an incorrect date may mislead your browser into forgetting about your cookie. To fix this, set the correct time and date on your computer.

(b) You have installed an application that monitors/blocks cookies from being sent. This may include virus protection software. To remedy this, simply disable the monitoring application before logging in.

(c) You are behind a firewall that doesn't allow you to receive cookies. This is sometimes the case for users connecting from a business intranet that limits cookie acceptance for security reasons.

(d) Your browser is simply not set to accept cookies (although, I guess you already verified this, right?)

(e) Your browser's cookie files are corrupted. (This is something you may have missed)

(f) Your browser itself is corrupted. (Not sure how this can be fixed. But, you could try removing it completely from your system, and then installing it again)

Here is another solution that may help you :

(a) Start Firefox in Safe Mode to check if one of the extensions (Firefox/Tools > Add-ons > Extensions), or if hardware acceleration, is causing the problem;

(b) Switch to the DEFAULT theme: Firefox/Tools > Add-ons >. Firefox uses the about: protocol to access built-in about: pages that you can open via the location bar just like you open web pages.

(c) Do NOT click the Reset button on the Safe Mode start window, or otherwise make changes.

(d) Clear cookies. If clearing cookies doesn't work, then it is possible that the cookies.sqlite file that stores the cookies is corrupted.

(e) Rename (or delete) cookies.sqlite (cookies.sqlite.old), and delete other present cookie files, like cookies.sqlite-journal in the Firefox profile folder, in case the file cookies.sqlite got corrupted.

like image 114
phpnewbie2015 Avatar answered Nov 15 '22 05:11

phpnewbie2015