We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 24374
    • 322 Posts
    Whatever you did in version 1.4.0 fixed this problem for me.
      • 3749
      • 24,544 Posts
      Whew. I completely re-wrote it for 1.4.0 but was afraid something about your platform was causing the problem. Thanks for letting me know (and sorry about the trouble). smiley

      The first thing the widget does now is check for the versionlist file and create it if it's not there (and quit with an error message if it couldn't create the 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
        • 51269
        • 7 Posts
        Quote from: BobRay at Nov 25, 2015, 04:16 AM
        Whew. I completely re-wrote it for 1.4.0 but was afraid something about your platform was causing the problem. Thanks for letting me know (and sorry about the trouble). smiley

        The first thing the widget does now is check for the versionlist file and create it if it's not there (and quit with an error message if it couldn't create the file).

        Hi, I am still with the same problem. In one of my platforms, I run 2.2.9, and it goes through the installation process, no matter which available version I choose (from 2.3x to 2.4.x), I end up with 2.2.9! I'm doomed! lol any more hints? thanks!
          • 3749
          • 24,544 Posts
          That most likely means that it's downloading, then extracting the new files to the /temp directory, but failing to copy them to their final locations, due to the permissions and/or ownership of the MODX folders. Check the permissions on the core folder and its children.
            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
            • 51269
            • 7 Posts
            Quote from: BobRay at Dec 08, 2015, 08:56 PM
            That most likely means that it's downloading, then extracting the new files to the /temp directory, but failing to copy them to their final locations, due to the permissions and/or ownership of the MODX folders. Check the permissions on the core folder and its children.

            Hi, thanks for your response. I went as far as chmod, temporarily, the core dir 777, but it keeps on behaving the same way. stuck on 2.2.9! the core dir on my other server has permissions 775, where as the assets subdirs, etc have 777...in neither setup I am able to run the upgrade :'(
              • 4172
              • 5,888 Posts
              maybe owner-issues?
                -------------------------------

                you can buy me a beer, if you like MIGX

                http://webcmsolutions.de/migx.html

                Thanks!
                • 3749
                • 24,544 Posts
                Many servers won't accept 777. More likely 755 is the correct value, but as Bruno17 says, the ownership may be the issue.
                  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
                  • 24374
                  • 322 Posts
                  So I've been merrily using version 1.4.0 with no problems on sites that were having trouble before. I just tried on one site, though, on a host a don't often use, and although it now displays the MODX versions to download, which it wasn't before, clicking the upgrade button brings up a white screen, and nothing happens. The log displays this message:

                  (ERROR @ /home/jactonfa/public_html/core/model/modx/processors/system/config_check.inc.php : 94) PHP warning: curl_setopt() [<a href='function.curl-setopt'>function.curl-setopt</a>]: CURLOPT_FOLLOWLOCATION cannot be activated when safe_mode is enabled or an open_basedir is set

                  open_basedir is indeed set on this server. Any way around this?
                    • 3749
                    • 24,544 Posts
                    I'm not sure. This is an issue in Setup, not UpgradeMODX. UGM just puts the files in place and launches Setup.

                    It's possible to detect open_basedir and do the follow in the code rather than using CURLOPT_FOLLOWLOCATION. This code in UGM, does that (which is why UGM works on that site):

                    if (filter_var(ini_get('open_basedir'), FILTER_VALIDATE_BOOLEAN) === false && filter_var(ini_get('safe_mode'), FILTER_VALIDATE_BOOLEAN) === false) {
                                        curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
                                    } else {
                                        curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false);
                                        $rch = curl_copy_handle($ch);
                                        $newurl = $url;
                                        curl_setopt($rch, CURLOPT_URL, $newurl);
                                        $header = curl_exec($rch);
                                        if (curl_errno($rch)) {
                                            $code = 0;
                                        } else {
                                            $code = curl_getinfo($rch, CURLINFO_HTTP_CODE);
                                            if ($code == 301 || $code == 302) {
                                                preg_match('/Location:(.*?)\n/i', $header, $matches);
                                                $newurl = trim(array_pop($matches));
                                            }
                                            curl_close($rch);
                                            curl_setopt($ch, CURLOPT_URL, $newurl);
                                        }
                                    }




                    Unfortunately, Setup's config_check doesn't do this (though it probably should).

                    I think more recent versions of PHP avoid this problem, so upgrading PHP might solve it. If not, it's fairly easy to disable that part of the configuration check, which you probably don't really need.

                    I think this would do it:

                    Change this line (line 76) in the core\model\modx\processors\system\config_check.inc.php file:

                    if ( function_exists( 'curl_init' )) {


                    to this:

                    if (false && function_exists( 'curl_init' )) {
                    [ed. note: BobRay last edited this post 8 years, 3 months ago.]
                      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
                      • 24374
                      • 322 Posts
                      I'm not sure the upgrade file ever gets downloaded to the site. Usually there is a delay of some seconds while the file is getting downloaded before Setup starts. In this case, the white screen comes up right away, and nothing else happens. Where would the temporary upgrade file get stored?