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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Upload broken in 2.4?

Go to End

55 Posts   15485 Views


Community Member, 10 Posts

5 September 2010 at 3:59am

I am having the exact same problem, so I checked out the latest 2.4 stable from SVN and tried that. No luck :(

My server has the open_base_dir thingy enabled (with PHP 5.2.14), so that might be causing the problems here since the files are being placed in my silverstripe-cache folder, but they aren't being moved to the assets folder though.

What are the exact patches one have to make in order to fix this issue? I've seen a lot of patches but which one is the best?



Community Member, 7 Posts

5 September 2010 at 6:00pm

Edited: 05/09/2010 6:01pm

Hello cyberde.

If you can disable open_basedir in your PHP-configuration you will be able to use the latest stable release of SilverStripe without modifications.

If not, you have to patch it, I recommend that you try this patch, it removes the unnecessary open_basedir hack/handling in AssetAdmin, which should solve your problem.

Good luck.


Community Member, 10 Posts

5 September 2010 at 9:28pm

Edited: 06/09/2010 3:52am

Unfortunately I'm unable to disable open_basedir since I'm on a shared hosting platform.
So I tried the patch, now I'm getting closer to getting it to work.

Now I'm getting a webpage error:

[Warning] move_uploaded_file(/home/cyberde/public_html/www/assets/Downloads/testfile.txt) [function.move-uploaded-file]: failed to open stream: Permission denied
POST /admin/assets/UploadForm
Line 248 in /home/cyberde/public_html/www/sapphire/filesystem/Folder.php

Okay, I'm going to kick my own ass right now. After numerous checks I finally found out that the permission of a subfolder was set to 775 instead of 777. Pretty stupid!

Anyway the patch worked :D


Forum Moderator, 53 Posts

13 September 2010 at 2:25pm

Hey Danzzz,

Thanks a lot for this patch:, worked for us too.



Community Member, 1 Post

29 September 2010 at 6:34am

Edited: 29/09/2010 6:42am

hi jseth,

make a copy of the 2 files showed in this file-diff:

then edit this 2 file as you see there -> green means add this code, red means remove this code

This patch worked for me.


Thanks for the fix. It works for me in the 2.4.2 version.
But your code have error.
See my jpg file.

Attached Files

Community Member, 1 Post

7 March 2011 at 11:57pm

Hmm, why hasn't the patch in (3 months ago) been merged into the latest release?

The ticket in has been marked fixed with the committed patch.

Are there issues with the patch? It seems to work just fine with us.


Celin Dion

Community Member, 1 Post

8 March 2011 at 2:33pm

I just did a fresh install of 2.4 RC1 and the upload just does not work. I have no clue what to me.

watch online movies


Community Member, 66 Posts

23 March 2011 at 10:47am

i did an update to 2.4.5
and - no Upload was working :-(

so i applied patch:
and things are well now...

HINT: one thing to mention:
in GD.php
at last line there's

if(file_exists($filename)) @chmod($filename,0664);

i think this should be