We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7586
    • 4 Posts
    djkenmasters Reply #1, 8 years ago
    Hello there! This is driving us crazy! We have two different ModX installs. On one, the value for PHPSESSID works as expected (stays the same on each page reload). However, on the other - the value changes on EVERY page load. This makes it nearly impossible to work on the site, as we get logged out of the manager if we even so much as view another resource in the same browser.

    I've searched and searched for solutions but nothing seems to work. We also can't find any differences between the two configurations.

    Please help me understand what could be causing this behavior...

    cookie domain: blank
    httponly: yes
    lifetime: 604800
    path: /
    secure: no
    gc lifetime: 604800
    class: modSessionHandler
    name: blank

    I've tried truncated the modx_session tables, clearing the cache, updating modx, all sorts of variations of the above settings - all with the same result (no PHPSESSID persistence).

    Please HELP!



    This question has been answered by djkenmasters. See the first response.

      • 3749
      • 24,544 Posts
      Have you uncommented one of the sections of .htaccess (after renaming it from ht.access) that forces www or non-www URLs? Users switching back and forth between the two is a common cause of session loss.

      On some servers, you also need to set your own session.save_path.
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
      • discuss.answer
        • 7586
        • 4 Posts
        djkenmasters Reply #3, 8 years ago
        Thanks for the fast reply RobRay!

        After much digging - we discovered that the hosting company for that particular package recently enabled Varnish caching server on our server. Due to some configuration issues, it was adding "no-cache, must-revalidate" headers to EVERY SINGLE PAGE REQUEST. Ugh! After excluding our site from Varnish altogether, our ModX installation is back to behaving as expected.

        Posting the answer here for the next poor bloke after spending WAY too much time trouble-shooting this.

        Cheers!
          • 3749
          • 24,544 Posts
          I'm glad you got it sorted. Thanks for reporting back. smiley
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting