Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Can't upload to new folders


Go to End


12 Posts   3687 Views

Avatar
UncleCheese

Forum Moderator, 4102 Posts

29 October 2009 at 12:40pm

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.

Avatar
joelg

Community Member, 134 Posts

30 October 2009 at 1:26am

Edited: 30/10/2009 1:29am

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

Avatar
UncleCheese

Forum Moderator, 4102 Posts

30 October 2009 at 2:06am

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. :)

Avatar
joelg

Community Member, 134 Posts

2 November 2009 at 8:48am

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

Go to Top