Jump to:

23376 Posts in 18295 Topics by 2867 members

General Questions

SilverStripe Forums » General Questions » Upload broken in 2.4?

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

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

Page: 1 2 3 4 5 6 7
Go to End
Author Topic: 12187 Views
  • cyberde
    Avatar
    Community Member
    10 Posts

    Re: Upload broken in 2.4? Link to this post

    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?

    Cheers!

  • charden
    Avatar
    Community Member
    7 Posts

    Re: Upload broken in 2.4? Link to this post

    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.

  • cyberde
    Avatar
    Community Member
    10 Posts

    Re: Upload broken in 2.4? Link to this post

    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

    Update
    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

  • frankmullenger
    Avatar
    Forum Moderator
    51 Posts

    Re: Upload broken in 2.4? Link to this post

    Hey Danzzz,

    Thanks a lot for this patch: http://open.silverstripe.org/attachment/ticket/5547/2.4.0-FileUpload.diff, worked for us too.

    Cheers!

  • amethystium
    Avatar
    Community Member
    1 Post

    Re: Upload broken in 2.4? Link to this post

    hi jseth,

    make a copy of the 2 files showed in this file-diff:
    http://open.silverstripe.org/attachment/ticket/5547/2.4.0-FileUpload.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.

    daniel
    _____________________________________________________________

    Hello!
    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
  • jcsiegrist
    Avatar
    Community Member
    1 Post

    Re: Upload broken in 2.4? Link to this post

    Hmm, why hasn't the patch in http://open.silverstripe.org/changeset/114471 (3 months ago) been merged into the latest release?

    The ticket in http://open.silverstripe.org/ticket/5547 has been marked fixed with the committed patch.

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

    :jean-claude

  • Celin Dion
    Avatar
    Community Member
    1 Post

    Re: Upload broken in 2.4? Link to this post

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

    __________________
    watch online movies

  • zyko
    Avatar
    Community Member
    66 Posts

    Re: Upload broken in 2.4? Link to this post

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

    so i applied patch:
    http://open.silverstripe.org/changeset/114471
    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
    Filesystem::$file_create_mask
    instead

    12187 Views
Page: 1 2 3 4 5 6 7
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.