We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10487 MODX Staff
    • 1,535 Posts
    @David - I seem to be having a similar problem: Install ran fine but nothing gets displayed for the manager login nor the frontend content. Just to rule out anything MAMP-specific, I’m using an Entropy build on my machine with PHP5.1.6 and MySQL5.0.21.

    I’ve traced the issue with my install to the point at which the session_start() gets called in $modx->_initSession() in modx.class.php - seems to cause a fatal error somehow stopping the script in it’s tracks (just results in a blank page, no errors being displayed). Anyone got any ideas? I’m stumped.

    EDIT: Oh, forgot to mention that I’ve also crosschecked my PDO settings and they’re all okay.
      Garry Nutting
      Senior Developer
      MODX, LLC

      Email: [email protected]
      Twitter: @garryn
      Web: modx.com
      • 6726
      • 7,075 Posts
      Yeah that’s exactly what happens Garry... I just tried to follow Susan’s footsteps and switched MAMP to php4 and it definitely works ! But it’s a bit annoying to get those problems with the more recent php versions, it doesn’t make much sense I’d very much like to get a grasp on what goes wrong...
        .: COO - Commerce Guys - Community Driven Innovation :.


        MODx est l'outil id
        • 31037
        • 358 Posts
        Quote from: OpenGeek at Dec 21, 2006, 01:58 PM

        Quote from: Uncle68 at Dec 21, 2006, 01:42 PM

        Note that it was a clean install at my web host that got me the "Could not load context: mgr", not an upgrade.
        If possible, uncomment line 91 in index.php to set debug mode and it might reveal more information.
        I did that, and it said at the end: "Error fetching result set: SELECT * FROM `databasname`.`modx_context` WHERE `key` = :keyArray"

        So I started to check the database and compared it to my working install on my local xampp. I found out that one table is missing from the non working install at my host, the modx_session table! I guess thats why it’s not working.

        Did run the installer again, but that table is still missing.

        About swedish characters: The upgrade set tables to latin1_general instead of latin1_swedish, could be me doing something I shouldn’t, will test it again.

        I also have the same problem not being able to log into manager, just returns to manager login, that is on an local xampp upgrade.
          • 22303 MODX Staff
          • 10,725 Posts
          Hmmm, try commenting out these lines in modX::_initSession() (lines 1842-1843):
                  $site_sessionname= isset ($this->config['session_name']) ? $this->config['session_name'] : $GLOBALS['site_sessionname'];
                  session_name($site_sessionname);
          

          And let me know what happens...
            • 10487 MODX Staff
            • 1,535 Posts
            Hi Jason, commenting those lines didn’t help matters but I have narrowed the problem down to these lines in the same function:
             session_set_save_handler(
                                array ($sh, 'open'),
                                array ($sh, 'close'),
                                array ($sh, 'read'),
                                array ($sh, 'write'),
                                array ($sh, 'destroy'),
                                array ($sh, 'gc')
                            );
            


            Commenting those lines out and everything loads fine. I’ll see if I can dig a bit further ...
              Garry Nutting
              Senior Developer
              MODX, LLC

              Email: [email protected]
              Twitter: @garryn
              Web: modx.com
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              When setting error_reporting to E_ALL, the first notice is this one:
              Notice: Only variables should be assigned by reference in /home/sites/sottwell.com/public_html/core/xpdo/pdo.class.php on line 93
              Is that anything serious?
                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
                • 22303 MODX Staff
                • 10,725 Posts
                Quote from: sottwell at Dec 21, 2006, 03:40 PM

                When setting error_reporting to E_ALL, the first notice is this one:
                Notice: Only variables should be assigned by reference in /home/sites/sottwell.com/public_html/core/xpdo/pdo.class.php on line 93
                Is that anything serious?
                No just a PDO for PHP 4 bug -- just need to remove the & on that line...
                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                  The core/cache/config.cache.php files are different between the local installation (new installation) and the updated one... the updated version has nothing in the file about session values, while the new version has several fields with session data. At what point are these written? Does the new installation process write that data?
                    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
                    • 28042 ☆ A M B ☆
                    • 24,524 Posts
                    Apparently not; I added the lines to the upgrade and it worked fine. Then I cleared the cache and it threw me right out to the login page again. So for some reason it’s not picking up the session name.
                      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
                      • 22303 MODX Staff
                      • 10,725 Posts
                      Quote from: garryn at Dec 21, 2006, 03:31 PM

                      Hi Jason, commenting those lines didn’t help matters but I have narrowed the problem down to these lines in the same function:
                       session_set_save_handler(
                                          array ($sh, 'open'),
                                          array ($sh, 'close'),
                                          array ($sh, 'read'),
                                          array ($sh, 'write'),
                                          array ($sh, 'destroy'),
                                          array ($sh, 'gc')
                                      );
                      


                      Commenting those lines out and everything loads fine. I’ll see if I can dig a bit further ...
                      Quote from: sottwell at Dec 21, 2006, 04:00 PM

                      The core/cache/config.cache.php files are different between the local installation (new installation) and the updated one... the updated version has nothing in the file about session values, while the new version has several fields with session data. At what point are these written? Does the new installation process write that data?
                      Quote from: sottwell at Dec 21, 2006, 04:08 PM

                      Apparently not; I added the lines to the upgrade and it worked fine. Then I cleared the cache and it threw me right out to the login page again. So for some reason it’s not picking up the session name.
                      AHA! It all makes sense now. That is indeed the problem. Looks like upgrades aren’t inserting the new values for some reason, despite me specifically addressing that problem about a week ago, or so I thought. Hmmm...I’ll take a look as soon as possible and get a fix out to ya. In the meantime, you can specifically insert the new values using the following SQL...

                      INSERT IGNORE INTO `modx_system_settings` (`setting_name`, `setting_value`) VALUES 
                      ('session_handler_class', 'modSessionHandler'),
                      ('session_cookie_path', '/'),
                      ('session_cookie_lifetime', '604800'),
                      ('session_cookie_domain', 'localhost'),
                      ('session_cookie_secure', '0'),
                      ('session_name', 'modxcmssession'),
                      ('cache_disabled', '0'),
                      ('cache_resource', '1'),
                      ('cache_resource_expires', '0'),
                      ('cache_db', '0'),
                      ('cache_db_expires', '0'),
                      ('cache_json', '0'),
                      ('cache_json_expires', '0');
                      

                      I also need to finish implementing the manager interface for these new settings (add lang entries, etc.), as well as for managing context specific configuration settings to override any core settings.