We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32303
    • 2 Posts
    Hello, I’m getting this same error as well. I’ve tried to apply the quick fixes mentioned above but still no luck, or I’m just too confused. Any help ASAP would be great! This is the only problem I’m having with installing this amazing CMS app!

    I’m a bit confused about the config.php.blank file...am I suppose to rename that to config.php before or after I’ve installed modx? As of right now, its called config.php, and it’s a blank document, and I’m stuck on this sessions error.

    Thanks!

    - Collin
      • 22303 MODX Staff
      • 10,725 Posts
      If your PHP session.save_path configuration does not have a valid directory location which the user account executing the Apache/PHP process can write to, you will have this problem. Find every instance of session_start in the code and right before the call to session_start, simply add a call to session_save_path so it looks something like this:

      // start session
      session_save_path('/some/valid/full/path/that/is/writable/and/preferrably/outside/the/web/server/document/root/');
      session_start();


      This will have to be done in the installer as well as in the config.inc.php file that is created during installation. You can find the session_start() call at the top of the /install/index.php
        • 32303
        • 2 Posts
        Find every instance of session_start in the code
        Aside from the installer index.php file having this "session_save_path" line inserted, what other "code" are you referring to that also needs to be edited? Other PHP files within the MODX folder, or others? The config file can’t be edited because it’s blank and I need to get past the installation first.
          • 22303 MODX Staff
          • 10,725 Posts
          Quote from: wheelstv at Jan 10, 2007, 05:59 PM

          Find every instance of session_start in the code
          Aside from the installer index.php file having this "session_save_path" line inserted, what other "code" are you referring to that also needs to be edited? Other PHP files within the MODX folder, or others? The config file can’t be edited because it’s blank and I need to get past the installation first.
          Yes, replace that in every location you can find in MODx (shouldn’t be many at all), install, then once the installer successfully writes the contents of the config.inc.php file, you’ll need to change it there as well before accessing the front-end web site or back-end manager interface.
            • 18409
            • 54 Posts
            I have php/mysql/apache on windows XP as a test bed.

            Php session handler is set to c:\temp and when i try the install test page it creates an empty session file in this location.

            It still fails on the "Checking if sessions are properly configured: Failed!" section though.

            I haven’t tried copying the "session_save_path..." line as suggested above as it strikes me a dangerous path to go down. any future upgrades etc would be very difficult once you start modfying the code. Also it appears to be created the sessions ok in the path specified in php.ini as it is creating the files.

            Sessions work fine in a test php script that I tried:
            session_start();
            if (!isset($_SESSION[’test’])) $_SESSION[’test’] = 1;
            $_SESSION[’test’]=$_SESSION[’test’]+1;
            echo "<p>Session is: {$_SESSION[’test’]} </p>";

            Any suggestions anyone?!
              • 18409
              • 54 Posts
              Originally sessions WEREN’T set up correctly, and the install script (correctly) failed.

              After configuring them I tried clicking "retry" which still kept failing.

              After rerunning setup it has passed ok.

              This is a bug in the install script I think, clearly the "retry" isn’t actually retrying.
                • 22303 MODX Staff
                • 10,725 Posts
                Quote from: markvr at Jan 11, 2007, 08:41 AM

                This is a bug in the install script I think, clearly the "retry" isn’t actually retrying.
                The problem was you didn’t have sessions setup correctly in the first place, when you started the install. Since sessions generally last until a new browser session is started, the fact that you fixed them in the middle of trying the installation does not make the install script buggy, because it wouldn’t start a new session after already in a "broken" session.
                  • 18409
                  • 54 Posts
                  This could be made clearer in the install script.

                  I would intuitively expect the "retry" button to retry all the items in the list.

                  Other wise it should simply say "please run setup again".