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.

DataObjectManager Module

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Can't upload to new folders


12 Posts   1635 Views


29 October 2009 at 12:40pm 4085 Posts

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.


30 October 2009 at 1:26am (Last edited: 30 October 2009 1:29am), Community Member, 129 Posts

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.



30 October 2009 at 2:06am 4085 Posts

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


2 November 2009 at 8:48am Community Member, 129 Posts

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.