Hi,
I have a live MODx Evolution site on a shared server which has a problem with the cookies timing out within half an hour of idle time. Seems to be something deep down inside as our backend guru is struggling to find time to find the MODx fix for this. We need a fix that won’t break on subsequent upgrades.
* anticipated start time - ASAP
* anticipated job duration - a couple of hours: if you’re an expert, I’m guessing possibly faster
* payment terms - name your price, preferebly a quote rather than an hourly rate
* scope of work - as outlined above: a one-off
* IP ownership constraints - the work can be donated back to the community as this seems like a pretty important problem to fix
Please get in touch via PM if you think you can fix this and you’re available.
Thanks.
-
☆ A M B ☆
- 24,524 Posts
Are you sure this is a cookie problem, and not a session problem? By default PHP sessions time-out in a bit less than half an hour; PHP’s internal garbage collection routines will remove any session files that are older than that. The MODx Manager handles the problem with a bit of javascript that requests a small image file every few minutes.
Revolution avoids the whole problem by using database storage instead of session files. You can specify your own location for the session files, but then you have to take care of cleaning up stale session files yourself.
-
☆ A M B ☆
- 24,524 Posts
The cookie only holds the session file name. This is all automatically handled in PHP, MODx has nothing to do with it. If the session file hasn’t been updated, PHP will remove it, and then the cookie is no longer relevant and is deleted, and a new one is set with the new session file name, since MODx starts a session on each page whether there is a valid cookie or not.
I’ve given up trying to fix this. I don’t have the experience to know *how* to fix this and I need to get this fixed ASAP.
Basically, I have a site that uses Weblogin but users are not kept permanently logged in. I need them to stay permanently logged in. The shared server I’m on *was* killing sessions after 24 minutes of inactivity. Although I’ve done everything suggested so far (local directory to store sessions, lengthened cookie lifetime, copied php.ini file to weblogin directory and others, and so on), it’s still not leaving users logged in for more than a few days at a time.
I’m aware this isn’t a MODx problem, but I’d like someone with MODx experience to help me with this, as they’ll already be familiar with the directory structure etc.
Please do get in touch if you think you can fix this.
-
☆ A M B ☆
- 275 Posts
HI
i guess you are talking about the user after logout very quickly with described snippet.
If so I only can tell you that in my case I did not find a parameter to extend session life time ((
So i just hardcoded php file variable which ’s not a good solution after all as after update it can be removed ((
modx and ecommerce pro