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

    Image upload with the FCKeditor Resources Browser is driving me crazy: I can upload to the ’images’ directory fine, but when i create a new folder in that directory from within the Resources Browser and try to upload an image to that new folder, it gives me an error: "Failed to upload file, internal error". This happens the same in two different installs, 0.9.2.1 and 0.9.5RC1.

    I have checked the forum and fixed the line breaks in manager/media/browser/mcpuk/connectors/php/config.php but that doesn’t seem to change a thing.

    Can anyone please tell me what’s wrong here?

    Cheers
      • 25663 MODX Staff
      • 12,272 Posts
      Maybe a permissions issue on newly created folders from the browser?
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 26178
        • 32 Posts
        I used to have the same problem. The trouble was that the server was running in the so-called "safe-mode" (it’s a matter of php configuration, I think). This could be your problem as well if you are running MODx on some kind of shared hosting plan. I don’t want to go in deep details here, just give you the solution, which worked for me...

        Replace this file - manager\media\browser\mcpuk\connectors\php\Commands\CreateFolder.php with the file attached to this comment. Before using, open it and change the (ftp) settings on lines 38 and 39.

        Hope, it’ll work.
          • 10323
          • 35 Posts
          safe_mode was the culprit!

          The hosting provider turned it off for the site and now uploads from the Resources Browser work fine.

          Thanks so much for pointing me in the right direction!

          Thanks for your workaround too, although I haven’t tried it out, but will keep it in case I have to install MODx in an environment where safe_mode cannot be turned off.

          Cheers
            • 4018
            • 1,131 Posts
            Safe mode should NEVER be on. There are just way too many limitations. My advice is that if the hosting provider you’re putting the website on is using safe mode...run! Find another hosting provider. There are other ways to configure PHP that do not require safe mode to be on and still be secure.
              Jeff Whitfield

              "I like my coffee hot and strong, like I like my women, hot and strong... with a spoon in them."
              • 10323
              • 35 Posts
              Thanks Jeff. I think the info that safe_mode should be off (or otherwise the Resources Browser doesn’t work properly, unless one applies a patch such as sara’s), should go into the installation instructions.
                • 26435
                • 1,193 Posts
                Another one to add to the FAQ. laugh
                  Husband, Father, Brother, Son, Programmer, Atheist, Nurse, Friend, Lover, Fighter.
                  All of the above... in no specific order.


                  I send pointless little messages