Jump to:

7935 Posts in 1536 Topics by 943 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » Can't upload to new folders

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1 2
Go to End
Author Topic: 1564 Views
  • UncleCheese
    Avatar
    4085 Posts

    Re: Can't upload to new folders Link to this post

    Are you getting an error from SWFUpload? Follow the steps in the swfuploadfield documentation on Troubleshooting. It's tedious, but eventually you'll find the line where it's failing.

    I recently did a support ticket for a user who had this same issue, and after researching the problem I found that the error was that the copy() function could not execute because PHP safe mode was enabled. Might want to look into that.

  • joelg
    Avatar
    Community Member
    129 Posts

    Re: Can't upload to new folders Link to this post

    Hi UncleCheese

    No, I'm not getting any errors. I've also turned debug on, but everything seems to work.

    I bet it's the safe_mode, which is ON on my server. Locally, with safe_mode OFF, the thing works fine.

    Is there any way for me to get this to work with safe_mode ON, 'cause the serverfolks won't change to safe_mode ON.

    Joel

  • UncleCheese
    Avatar
    4085 Posts

    Re: Can't upload to new folders Link to this post

    If it's the same error I saw earlier this week, it comes from line 129 in Upload.php

    129 if(file_exists($tmpFile['tmp_name']) && copy($tmpFile['tmp_name'], "$base/$relativeFilePath")) {

    The error is that the copy() function cannot be run because safe mode is on. If your PHP configuration is prohibiting you from copying files, there's not much hope for uploading, I'm afraid.

    Maybe you can tweak your php.ini and make an exception for the copy() function? I have no idea how safe mode works. All I know is that it's annoying.

  • joelg
    Avatar
    Community Member
    129 Posts

    Re: Can't upload to new folders Link to this post

    Hi again UncleCheese

    I simply solved the problem by pointing my dns to another webhotel with safe_mode off. And yes, it works now. Really wonderful!

    Thanks for your feedback and help.

    Joel

    1564 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.