We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5119
    • 90 Posts
    Okay, most of the subscribers are off the site now, so I added the session_save_path where you suggested. I’m having problems getting the right path to the directory, just under public_html.

    I’ve tried:

    /sesstmp
    /sesstmp/
    ./sesstmp
    ../sesstmp
    ../../sesstmp

    and no joy so far. I’m not sure how I should refer to in php be none of these are working for me.
      • 5119
      • 90 Posts
      I *think* I’ve fixed it with this:

      session_save_path(realpath(dirname($_SERVER[’DOCUMENT_ROOT’]) . ’/sesstmp’));


      I’m going to get one of the other users to check and will let you know for sure. Hopefully this will all prove useful to someone else.
      • You can find your actual path in Reports -> System info, and you can use the full path. You could also use the defined constant MODX_BASE_PATH, as that is calculated before the function is defined.
          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
          • 5119
          • 90 Posts
          Is that better than using the $_SERVER stuff that I used? It seems to work so I’m loathe to change it now - unless there’s a good reason to, of course.
            • 5119
            • 90 Posts
            ...and still I’m struggling to get this to work.

            Despite garbage collection not being set, something is cleaning up the files. Despite setting the timeout to a very long time, people are still having to log in (less often, granted, but still regularly, whereas the old site just accepted them even if they hadn’t viewed the site for a week).

            Would I be right in saying that I have to add something to the cookie that’s stored on the user’s computer in order for this to happen? If so, how do I do that?
              • 5119
              • 90 Posts
              Ignore that last bit - a hangover to the problem, but probably better discussed in another area.