We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 31782
    • 103 Posts
    My users of MODx site often complain that after a certain time (from 2-3 hours to several days) throws out of their accounts and have to login again. I have tried to increase the lifetime of the session, but it does not help.
      • 27178
      • 22 Posts
      Quote from: Volgar at Jan 28, 2011, 09:58 AM
      (from 2-3 hours to several days)

      Since they don’t logged out at same time, couldn’t be something at their end? like browser settings(e.g. clear cookies on browser exit)?
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        It would also help to know which version of MODx, as they handle sessions differently.
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
          • 31782
          • 103 Posts
          like browser settings(e.g. clear cookies on browser exit)?
          No, they use default browser settings. For example, I clean my cookies only by hand, but I have the same problem as other user.

          It would also help to know which version of MODx, as they handle sessions differently.
          Oh, yes, version 0.9.6.3
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            Shared hosting?
              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org
              • 31782
              • 103 Posts
              One of my friends said the cause may be in the server configuration, but he does not know what it is.
              Shared hosting?
              Yes
                • 31782
                • 103 Posts
                The problem has no solution. shocked
                  • 25663 MODX Staff
                  • 12,272 Posts
                  Shared hosting means the session garbage collection from other sites on the server is likely kicking in. Solution: talk to the server admins or move hosts.
                    Ryan Thrash, MODX Co-Founder
                    Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                    • 31782
                    • 103 Posts
                    Thank you rthrash.
                    I wrote to support hosting.
                      • 28042 ☆ A M B ☆
                      • 24,524 Posts
                      You can modify the startCMSSession() function at the end of the manager/includes/config.inc.php file to add a line changing the location of the session files to some location of your choosing. Then the server-wide garbage collection that effects the entire shared server won’t effect your sessions. You’ll need to do something about cleaning out stale session files yourself, or they’ll fill up your disk space eventually.

                      http://php.net/manual/en/function.session-save-path.php
                        Studying MODX in the desert - http://sottwell.com
                        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                        Join the Slack Community - http://modx.org