We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26503
    • 620 Posts
    I'm getting this error trying to setup modx 2.2.2:

    FATAL ERROR: MODX Setup cannot continue.
    
    Make sure your PHP session configuration is valid and working.
    


    Not sure what is happening, no errors in the logs, the session file is getting written, here are the php session settings:

    [Session]
    ;session.bug_compat_42 = Off
    ;session.bug_compat_warn = Off
    session.bug_compat_42 = 0
    session.bug_compat_warn = 1
    session.auto_start = 0
    session.cache_limiter = nocache
    session.cache_expire = 180
    
    url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"
    session.name = canadianworldmusic
    session.use_only_cookies = 1
    session.serialize_handler = php
    session.cookie_path = /
    session.entropy_length = 0
    session.entropy_file =
    session.gc_probability = 1
    session.gc_divisor = 1000
    session.cookie_domain =
    session.cookie_httponly =
    ;session.gc_maxlifetime = 43400
    session.gc_maxlifetime = 1440
    session.referer_check =
    session.save_handler = files
    session.save_path = "/var/www/vhosts/canadianworldmusic.com/tmp"
    session.cookie_lifetime = 0
    session.use_cookies = 1
    session.use_trans_sid = 0
    
    session.hash_function = 0
    session.hash_bits_per_character = 5
    




    not sure what is going on here - how can I get modx to show me the actual error and not this??

      *** Not just websites, we also create signage, banners, print, trade show displays and more! ***

      Sean Kimball CLP, CLS.
      Technical Director / Sr. Developer | BigBlock Studios
      ._______________________________________________.
      Bigblock Studios http://www.bigblockstudios.ca Web site design & development.
      27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
      phone/fax: 905-426-5525
      • 26503
      • 620 Posts
      Think I found the problem, I was able to install after setting the $_SESSION['session_test'] variable manually

      in setup/index.php these lines seem to have an issue with fastcgi implementations:
      /* session loop-back tester */
      if (!$isCommandLine && (!isset($_GET['s']) || $_GET['s'] != 'set') && !isset($_SESSION['session_test'])) {
          $_SESSION['session_test']= 1;
          echo "<html><head><title>Loading...</title><script>window.location.href='" . MODX_SETUP_URL . "?s=set';</script></head><body></body></html>";
          exit ();
      } elseif (!$isCommandLine && isset($_GET['s']) && $_GET['s'] == 'set' && !isset($_SESSION['session_test'])) {
          die('<html><head><title></title></head><body><h1>FATAL ERROR: MODX Setup cannot continue.</h1><p>Make sure your PHP session configuration is valid and w$
      }
      


      all I did to get it to install was:

      /* set manually */
       $_SESSION['session_test']= 1;
      
      /* session loop-back tester */
      if (!$isCommandLine && (!isset($_GET['s']) || $_GET['s'] != 'set') && !isset($_SESSION['session_test'])) {
          $_SESSION['session_test']= 1;
          echo "<html><head><title>Loading...</title><script>window.location.href='" . MODX_SETUP_URL . "?s=set';</script></head><body></body></html>";
          exit ();
      } elseif (!$isCommandLine && isset($_GET['s']) && $_GET['s'] == 'set' && !isset($_SESSION['session_test'])) {
          die('<html><head><title></title></head><body><h1>FATAL ERROR: MODX Setup cannot continue.</h1><p>Make sure your PHP session configuration is valid and w$
      }
      

        *** Not just websites, we also create signage, banners, print, trade show displays and more! ***

        Sean Kimball CLP, CLS.
        Technical Director / Sr. Developer | BigBlock Studios
        ._______________________________________________.
        Bigblock Studios http://www.bigblockstudios.ca Web site design & development.
        27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
        phone/fax: 905-426-5525
        • 22303 MODX Staff
        • 10,725 Posts
        That means your sessions are not working properly if you have to manually set it every time.
          • 26503
          • 620 Posts
          Quote from: opengeek at May 24, 2012, 02:35 PM
          That means your sessions are not working properly if you have to manually set it every time.

          Not quite sure I follow, I only [seem] to have to set this once during install, migrating and/or switching an existing site to FastCGI is no problem [I don't get the issue]
            *** Not just websites, we also create signage, banners, print, trade show displays and more! ***

            Sean Kimball CLP, CLS.
            Technical Director / Sr. Developer | BigBlock Studios
            ._______________________________________________.
            Bigblock Studios http://www.bigblockstudios.ca Web site design & development.
            27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
            phone/fax: 905-426-5525
            • 22303 MODX Staff
            • 10,725 Posts
            The point of the session loop-back testing is to make sure when I set a session value that it is being saved and returned to the next request properly. If you change the code to manually set it, bypassing this check, you are simply avoiding the issue. The problem is the file-based sessions on your server are not working properly. I imagine the session.save_path is invalid or not writable by the PHP process user.

            The reason MODX likely works anyway, is because MODX uses a database table to store session data in by default. Thus, if the only issue with your session configuration was the save_path (as I described above), MODX would still work, despite the issue.