We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38373
    • 8 Posts
    Yeah I'm pretty sure it's got to be a permission issue too, although I'm not sure how just yet, I ran a couple of installs with the permissions completely set to world read / write on everything and it still failed.

    I used wget and unzipped on the server via the CLI, all 3 times, there could be a problem there, it might be worth sftp-ing it manually and seeing if anything different happens.

    Mod Security is on, but the audit log is clear, disabling suhosin made no difference. The thing is, something should show up in a log somewhere but there's nothing.

    I'm going to reaaally relax our server config, disable Mod Sec, and try a manual upload.
      • 38373
      • 8 Posts
      OK.

      I don't think it's permissions. Here's what I've done:

      – Pre install

      – Unzipped installation file locally
      – Uploaded to the server
      – Chmod all files / folders 777 (Ridiculous, but I thought I might as well)
      – RTFM, RTFM AGAIN.
      – Checked server requirements again
      – Disabled suhosin (tested to make sure)
      – Disabled mod security (tested to make sure)
      – Decided to get creative and do an advanced install, which went swimmingly. (Moved the core outside doc root, custom manager name, everything else was default).


      – Post install:

      – Checked these logs: apache error log, mod sec audit, suhosin, php errors, /core/cache/log:
      – All ERROR FREE (Yes even the install log this time).
      – Checked all the config paths, they're all good and reflect my custom location.
      – load up the manager aaaaaaaand:

      – Call to a member function isAuthenticated() on a non-object

      – So I put together a basic test in the manager directory with:

      <?php
      
      require dirname(__FILE__) . '/config.core.php';
      
      if (!defined('MODX_CORE_PATH')) define('MODX_CORE_PATH', dirname(dirname(__FILE__)) . '/core/');
      
      require_once MODX_CORE_PATH . 'model/modx/modx.class.php';
      
      $modx= new modX('', array(xPDO::OPT_CONN_INIT => array(xPDO::OPT_CONN_MUTABLE => true)));
      
      $modx->initialize('mgr');
      
      print $modx->user->isAuthenticated('mgr');
      
      


      Note the require instead of include, let's make damn sure we're getting the files we need.
      And you guessed it, the result: Call to a member function isAuthenticated() on a non-object

      Can anyone think of any clever dubbuging experiment I can run to start looking for the cause of this?

      Matt.
        • 38373
        • 8 Posts
        SOLUTION!!

        Slaps head, throws laptop out of window, and thanks Bob for humouring my stupidity!!

        session.auto_start should obviously be off. I hadn't even noticed it was on unitl I decided to go through my php.ini line by line.

        @zapfe6204 I'd bet anything you've got session.autostart = 1 somewhere in your config. Revo won't work with it on, the modx object wasn't getting created because the class definition has to be loaded BEFORE starting the session, otherwise you wont be able to recreate the object in the session, hence "a call to a member function isAuthenticated() on a non-object";

        Matt.
          • 30585
          • 833 Posts
          I had a similar problem, my error log had this among other things:

          [2012-10-01 07:09:11] (ERROR @ /setup/index.php) Error 42S22 executing statement: 
          Array
          (
              [0] => 42S22
              [1] => 1054
              [2] => Unknown column 'modAccessPermission.policy' in 'where clause'
          )


          I figured it was a permission issue so I changed my core/config permission from 755 to 777 and believe it or not, it worked. I should mention that I was upgrading from 2.2.2 to 2.2.3. One more upgrade to go and I hope this time I won`t have any issues.

            A MODx Fanatic