Jump to:

23490 Posts in 18996 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » Uploadify File Size Limit

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
Go to End
Author Topic: 1582 Views
  • Scott Farmer
    Avatar
    Community Member
    35 Posts

    Uploadify File Size Limit Link to this post

    Hi,

    I'm trying to upload files greater than 8M using uploadify module. Using latest stable version of silverstripe 2.4.xx

    I've tried adding custom php.ini under the sapphire folder:

    upload_max_filesize = 20M

    post_max_size = 20M

    max_input_time = 120

    max_execution_time = 120

    Also tried adding in .htaccess file.

    I'm running MAMP and php version 5.2.17. Looking at the php.ini, upload limit is set at 32M.

    Turning on uploadify debugging, shows a file size limit of 8000000 bytes.

    Interesting to note, when echo this line to the screen: ini_get('upload_max_filesize'), it comes back with 256M

    Any help here would be much appreciated.

    Regards
    Scott

  • feejin
    Avatar
    Community Member
    22 Posts

    Re: Uploadify File Size Limit Link to this post

    Does Uploadify have a separate max file size setting?

    Have you tried changing MAMP's main php.ini to see if that helps?
    (also, IIRC, you should be putting your php.ini in root, not in /sapphire)

  • Scott Farmer
    Avatar
    Community Member
    35 Posts

    Re: Uploadify File Size Limit Link to this post

    You can can set file size like this:
    $UserPhoto->setVar('sizeLimit', '5242880'); (doesn't work)

    Otherwise it gets the file size from the php setting for max file upload size. Setting the above and the php variable made no difference. It was always 8mb. Default on the server was 32mb.

    I couldn't work where it was getting the 8mb from. I looked at the javascript code (after switching to src version) in uploadify and found where it was setting the size limit, about line 93 and hacked in a number to see if it would work and it did! i.e.
    if (settings.sizeLimit) data.sizeLimit = 20971520;

    I haven't had a chance to work through, but at some point the variable is not getting set or passed through. I needed a quick solution.

    Changing the php.ini and placing in root or sapphire folder had no effect at all.

    1582 Views
Page: 1
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.