We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15404
    • 14 Posts
    Hi i having the problem trying to download Package Management i get the following error....

    Could not download package at: http://modx.com/extras/download/?id=4e2ef779f245542b4b000013

    thakns
      • 3749
      • 24,544 Posts
      First, make sure cURL is enabled. Then make sure the core/packages directory is writable.
        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
        • 15404
        • 14 Posts
        is done but nothing change i cheek the cURL and set permission to 777... not difference... any idea
          • 3749
          • 24,544 Posts
          It’s worth trying 755, in case the host is using SuPhp or SuExec.

          If you’re downloading something large, like TinyMCE, the download could be timing out, especially if the connection if slow.

          Try downloading a little package like QuickEmail or Canonical.
            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
            • 26903
            • 1,336 Posts
            OK, just had a look at this error on a server I'm working on, this has safe mode off but an openbasedir restriction in effect, allow_url_fopen is on and gives the error above.

            Debugging the code the reveals contents returned from file_get_contents are null, hence the error.

            If I manually dial up the url in question http://modx.com/extras/download/?id=4d737199f245546023000014 after a redirect to amazon it works, ie I can down load the zip file so its not that.

            OK, change the code to force CURL to do this, fails unless you add the line :-
            curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
            

            to allow for the redirect, it then still fails with this :-

            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

            Forcing fsockopen also fails.

            This used to work on this site so I'm guessing the fault is the redirect to Amazon for the package, it doesn't look as though this is going to work on servers with open basedir restrictions in effect at the mo.

            Can we have another provider url that acts as a package mirror that's not in the 'cloud' for these servers, i.e as it used to be, either that or can someone come up with some cunning code to get round this.

              Use MODx, or the cat gets it!
            • Thanks for the research and follow-up shamblett. Let's use this bug report to track the issue and any resolutions we come up with.
                • 26903
                • 1,336 Posts
                Yep, no probs, I'm sure we'll come up with something.
                  Use MODx, or the cat gets it!
                  • 37546
                  • 6 Posts
                  Is there a patch for 2.1.3?

                  I also have this problem with Safe Mode off and open_basedir set.

                  (ERROR @ /home/.sites/143/site2/web/modx/core/model/modx/transport/modtransportpackage.class.php : 282) PHP warning: curl_setopt() [<a href='function.curl-setopt'>function.curl-setopt</a>]: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set
                    • 37686
                    • 94 Posts
                    Sorry, im a bit nooby with this, but what do you mean with enable cURL, and make the directory writeable?