Post by gizmecano » Wed Nov 16, 2016 3:30 pm

Since yesterday, I face up to a strange (and annoying) behaviour with an installation of OpenCart (version 2.0.1.1). After having logged to the admin, the session suddenly breaks (between one and five minutes) and the user is then redirected to the login page (losing all he was working on before, such as product addition and so on).

As I never experienced this kind of behaviour before (I use Opencart for a while now), I wonder what can happen: is it a sudden configuration change (I can't find any trace of it and I haven't changed anything), an issue with the hosting (but how to check it?) or a potential bug (but after some research, I haven't found any trace of this kind of issue)...

Thanks for any ideas on this trouble...

User avatar
New member

Posts

Joined
Mon Apr 13, 2015 9:21 pm

Post by opencartmart » Wed Nov 16, 2016 5:14 pm

When it was happened exactly? I mean, after clicking on button or link or without any action?

XForm - Opencart Form Builder
Xshippingpro - An advanced Shipping Module
Need Professional support? Skype: opencartmart


Active Member

Posts

Joined
Wed Oct 02, 2013 3:59 am

Post by gizmecano » Wed Nov 16, 2016 8:25 pm

opencartmart wrote:When it was happened exactly? I mean, after clicking on button or link or without any action?
I personally noted this behavior when I click on the left main menu (for example, for going back to the main board), but another user told me that this occurs often when he click on the save button after editing or adding a product.

User avatar
New member

Posts

Joined
Mon Apr 13, 2015 9:21 pm

Post by opencartmart » Wed Nov 16, 2016 9:45 pm

Session can get lost in two cases:

1. You were idle long time
2. Session token mismatch OR provided empty session token.

XForm - Opencart Form Builder
Xshippingpro - An advanced Shipping Module
Need Professional support? Skype: opencartmart


Active Member

Posts

Joined
Wed Oct 02, 2013 3:59 am

Post by paulfeakins » Wed Nov 16, 2016 10:32 pm

The problem is most likely related to session files on the server.

A session file is needed to store that you're logged in. But they also need to be deleted at some point. php.ini controls how long they're stored with the variable:
session.cookie_lifetime

Also some web hosts manually remove these from their /tmp directory at set intervals, so it's worth asking them.

But sounds to me like it's a hosting / server config issue rather than an OpenCart one.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by gizmecano » Thu Nov 17, 2016 4:35 pm

opencartmart wrote:You were idle long time
I don't think this can be the reason, because this disconnection happens often during editing activities.
opencartmart wrote:Session token mismatch
I don't really understand this hypothese: how such an error can suddenly occur?
opencartmart wrote:provided empty session token
I don't clearly understand this point. After login, the URL seems to contain a value for token, for example in

Code: Select all

common/dashboard&token=`value`

User avatar
New member

Posts

Joined
Mon Apr 13, 2015 9:21 pm

Post by gizmecano » Thu Nov 17, 2016 4:45 pm

paulfeakins wrote:A session file is needed to store that you're logged in. But they also need to be deleted at some point. php.ini controls how long they're stored with the variable:
session.cookie_lifetime
I don't have this variable on my php.ini, but a `session.gc_maxlifetime` set at 3600. Do you think I need to add a `session.cookie_lifetime` variable in addition?
paulfeakins wrote:Also some web hosts manually remove these from their /tmp directory at set intervals, so it's worth asking them.
Is there a way to control this kind of settings?
paulfeakins wrote:But sounds to me like it's a hosting / server config issue rather than an OpenCart one.
I suppose so too. This installation have worked without this kind of troubles since several weeks now. The question is to find what have suddenly changed in the settings (and why).

User avatar
New member

Posts

Joined
Mon Apr 13, 2015 9:21 pm
Who is online

Users browsing this forum: No registered users and 428 guests