Jump to:

23013 Posts in 11872 Topics by 2830 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: 11741 Views
  • t00thy
    Avatar
    Community Member
    31 Posts

    Re: Upload broken in 2.4? Link to this post

    Hi,

    in SS 2.4.5 you can use it on the same line.
    You need remove line 479 and 480 in Upload.php

    This is the lines you need to remove

    $isRunningTests = (class_exists('SapphireTest', false) && SapphireTest::is_running_test());
    if(isset($this->tmpFile['tmp_name']) && !is_uploaded_file($this->tmpFile['tmp_name']) && !$isRunningTests) {

    This is the changes i make to work.

  • KoJans
    Avatar
    Community Member
    14 Posts

    Re: Upload broken in 2.4? Link to this post

    Thanks Charden,

    This patch worked for me in 2.4.5.

    Ko

  • MagicUK
    Avatar
    Community Member
    60 Posts

    Re: Upload broken in 2.4? Link to this post

    I've just had the same problem. Silverstripe 2.4.5

    I just applied the patch as per: http://open.silverstripe.org/attachment/ticket/5547/2.4.1-FileUpload-2.diff

    I still get the error message. I've uploaded the images to my UPloads folder via FTP and then added them 'from the file store' that way. But what's weird now is that I see no thumbnail on the field. (see attached) Can this maybe point to another issue?

  • MagicUK
    Avatar
    Community Member
    60 Posts

    Re: Upload broken in 2.4? Link to this post

    Can anyone help with my issue above. I'm working on a pretty job and this hindering me a lot. Can anyone suggest what the issue could be?

    A few post back someone mentioned adding 'php_admin_value open_basedir none' to the vhost config file. I asked my server administer to do this and they gave me this response, but the CMS is still behaving the same:

    The server is setup to support .htaccess level php controls. I've added "php_flag open_basedir none" to the .htaccess file located in the root directory. This should serve as you require.

    The site im working on isn't located in the root directory. Would I need to add the line into the .htaccess file on the silverstripe directory for this to have an effect?

    Any other suggestions on how I can get this issue sorted? Thanks so much.

  • cheeks
    Avatar
    Community Member
    4 Posts

    Re: Upload broken in 2.4? Link to this post

    hope you guys can help

    i am using ss245

    still cannot upload any files

    my server log shows the following

    =====================

    PHP Warning: Unknown: open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/opt/silverstripe) in Unknown on line 0
    pHP Warning: File upload error - unable to create a temporary file in Unknown on line 0

    =====================

    i seem to have a " open_basedir " problem

    any help greatly appreciated

  • Bikerboy
    Avatar
    Community Member
    3 Posts

    Re: Upload broken in 2.4? Link to this post

    Version 2.4.7 also showing 'File not a valid upload' when I try and import images. If this problem is persistent then I won't be able to use SS for another site that I'm planning which would be a great pity.

    (The attached image, if it shows, is a test to see if it uploads images to the forum)

    Attached Files
  • swaiba
    Avatar
    Forum Moderator
    1769 Posts

    Re: Upload broken in 2.4? Link to this post

    Ignoring that this thread is about 2.4.5 issues BikerBoy...

    these are what has worked for me...

    2.4.5 - http://open.silverstripe.org/attachment/ticket/5547/2.4.0-FileUpload.diff
    2.4.7 - http://open.silverstripe.org/changeset/114471

    11741 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.