We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 42885
    • 5 Posts
    We're running 2.2.15 advanced just fine but when I try to do the advanced upgrade to 2.4.2 by merging in the core directory and putting the setup directory in place it fails. We're running RHEL 6 with Apache 2.2.15 and php55 with php-fpm. The odd thing I notice is that the URL changes https://xxx.xxx.xxx/setup to https://xxx.xxx.xxx/cgi-bin/php.fcgi with parameters appended to it. The apache error log says:
    FastCGI: server "/xxx/xxx/xxx/cgi-bin/php.fcgi" stderr: Access to the script '/xxx/xxx/xxx/cgi-bin/php.fcgi' has been denied (see security.limit_extensions), referer: https://xxx.xxx.xxx/setup/index.php

    MODX Revo has been running fine with the same configuration -- what is the setup script doing differently that is causing fastcgi to trip up?

    I've tried modifying security.limit_extensions to allow all extensions but when I do that the contents of php.cgi script gets displayed in the browser window.

    Any idea on how I can correct the problem?
      • 3749
      • 24,544 Posts
      The core folder isn't the only one you need to update. You'd also need to update the connectors and manager folders. And if you transfer the files individually with FTP, you often get missing or corrupted files.

      That's also a pretty big jump in versions.

      I'd recommend installing the UpgradeMODX extra and using it to upgrade to 2.3.0, then 2.3.6, then 2.4.2.
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 42885
        • 5 Posts
        Thanks for the reply but I don't think that's correct and if it is then those folders are missing from the advanced installer. Also I don't think the major version jump would have anything to do with not being able to even begin the installation due to the error.

        Any other ideas?
          • 3749
          • 24,544 Posts
          I'd recommend installing the UpgradeMODX extra and using it to upgrade to 2.3.0, then 2.3.6, then 2.4.2.
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 42885
            • 5 Posts
            Well, I may try that once I get to the point that the upgrade will start. BTW, I had already tried the UpgradeMODX extra before attempting the manual upgrade and it didn't work and it didn't log anything I could use to track down the problem.

            Out of desperation I edited the index.php file in the setup folder to add an echo statement to see how far it was getting and that for some reason allowed it to display the first page of the setup process. Weird. Some sort of odd encoding on the file that editing the file corrected maybe? I don't know.

            However, it didn't get very far before it bombed out on the setup screens. Checking the logs it was complaining about what looked to be syntax errors on variable definitions in the core config file. Missing quotes on some but not all of them. No idea how that happened as I've never touched any of that directly. Adding quotes helped it get a little further but now is getting a 500 error and checking the php-fpm www-error.log I see the this:

            [10-Dec-2015 09:18:44 America/Chicago] PHP Fatal error:  Class 'xPDODriver_' not found in /folder/core/xpdo/xpdo.class.php on line 1880
            [10-Dec-2015 09:18:57 America/Chicago] PHP Warning:  require_once(/folder/www/site/html/setup/includes/drivers/modinstalldriver_{database_type}.class.php): failed to open stream: No such file or directory in /folder/www/site/html/setup/includes/modinstall.class.php on line 91
            [10-Dec-2015 09:18:57 America/Chicago] PHP Fatal error:  require_once(): Failed opening required '/folder/www/site/html/setup/includes/drivers/modinstalldriver_{database_type}.class.php' (include_path='.:/opt/remi/php55/root/usr/share/pear:/opt/remi/php55/root/usr/share/php:/usr/share/pear:/usr/share/php:/folder/www/site/html:/folder/www/site/html/setup/includes/') in /folder/www/site/html/setup/includes/modinstall.class.php on line 91
            


            As you can see in the include_path I tried adding the path needed but it seems to me that it's not the path that's the problem but perhaps the fact that it didn't substitute the "{database_type}" with the actual value.

            Any ideas?
              • 3749
              • 24,544 Posts
              Check the paths and URLs in the core/config/config.inc.php file.
                Did I help you? Buy me a beer
                Get my Book: MODX:The Official Guide
                MODX info for everyone: http://bobsguides.com/modx.html
                My MODX Extras
                Bob's Guides is now hosted at A2 MODX Hosting
                • 42885
                • 5 Posts
                After I got the upgrade process to begin then doing as you suggested and starting with 2.3.0 -> 2.3.6 -> 2.4.2 worked. The only error I got was on the 2.4.2 part of the upgrade. On the success screen clicking on Toggle Warnings would display:

                Error updating table for class modManagerLog
                Array
                (
                [0] => 00000
                [1] => 
                [2] => 
                )
                


                Is that something to be concerned about? Is there something I should check?

                Also (and I knew this before I did the upgrade) updating the statcache plugin from 1.3.0 -> 1.4.0 caused it to quit creating static files in the cache directory. Not sure why or what needs to be checked.

                Thanks for your help and suggestions.
                  • 3749
                  • 24,544 Posts
                  The 'warnings' are normal. They usually just mean that the object being installed is already there. IIRC, anything critical will show up without having to click on the button.
                    Did I help you? Buy me a beer
                    Get my Book: MODX:The Official Guide
                    MODX info for everyone: http://bobsguides.com/modx.html
                    My MODX Extras
                    Bob's Guides is now hosted at A2 MODX Hosting