We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7327
    • 195 Posts
    Hi guys,

    I recently moved a project running 2.5.5 PL from my localhost to a shared hosting. Not the smoothest but at least I got most of the essentials running. Now when I was trying to install a 3rd party package earlier, I encountered this:

    Console running...
    Attempting to install package with signature: analytics-1.0.0-rc1
    Package found...now preparing to install.
    Target directory is either not a directory or writable: /home4/<mydir>/public_html/core/ packages/
    Could not transfer package analytics-1.0.0-rc1.transport.zip to /home4/<mydir>/public_html/core/ packages/.
    Could not install package with signature: analytics-1.0.0-rc1


    I tried installing, reinstalling, and removing, and they don't work. Downloading extras is not a problem but trying to install them gives me the above errors. I tried this with a number of other packages already. I also notice that there's a space between the '/' and the word 'package' above - so I'm thinking this might be the cause of the problem. Does anyone know where I can look for this extra space?

    UPDATE: There was one step I didn't apply in the migration process and that was changing the core path in the workspace. The original value was {core_path} so I thought this was a variable that was already set somewhere. I changed this to:

    /home4/<mydir>/public_html/core/

    And the package manager had no problems accessing the directory. In any case, I can see that {core_path} already provided the right value, it's just that it added a space. Is this a bug? Anyone know what main modx or PHP variable core_path is deriving its value from so I can see if there's anything I set that maybe had the space?
    [ed. note: diatomin last edited this post 11 years, 4 months ago.]
      • 3749
      • 24,544 Posts
      {core_path} might be based on the setting in core/config/config.inc.php or on one of the three config.core.php files (most likely the one in manager/includes).
        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
        • 7327
        • 195 Posts
        Checked the core paths on these again, nope, no space after the trailing /
        • I think there's got to be somewhere else that the {core_path} value is cached or set when this occurs. I've seen it a couple of times, once on a server move, and once on a re-install and db upload.

          I've always left {core_path} alone when I see this, since by all accounts, it should be calling up the proper core_path. But now that you've solved it by inserting an absolute path we know it's not fetching what it's supposed to. The question is... why?


          Wish I'd thought of using an absolute path there. Would have saved me a lot of uninstalling and reinstalling (you have to uninstall the hard way to get them out when this is happening).
            Frogabog- MODX Websites in Portland Oregon
            "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
            Having server issues? These guys have MODX Hosting perfected - SkyToaster
            • 7327
            • 195 Posts
            Hmm.. Should we file a bug report?
            • Perhaps. File it with your new information. It's come up enough times on the forum now to call it buggy.

              The other aspect is that new packages work fine. So core_path is working in some way. Just not for the previous packages.

                Frogabog- MODX Websites in Portland Oregon
                "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
                Having server issues? These guys have MODX Hosting perfected - SkyToaster