Skip to:
Content
Pages
Categories
Search
Top
Bottom

Hey, Upload size limit issues please help!

  • @cixxy

    Member

    No matter what I do i get this error on my site http://anothera.net

    http://i30.tinypic.com/1676rkn.png
    “the file you have uploaded is too big. Please upload a file under”

    I have tried EVERYTHING! adding a php.ini to site with upload_max_filesize , adding upload_max_filesize to htaccess, contacting host and asking them to modify upload size. But no matter what, all I can upload are below 200k images. Anything over that awards this error. Please help?

    I have checked Phpinfo the UL limit is correctly set on 10mb

    Thanks so much for the plugin you guys are a godsend to my site.

Viewing 20 replies - 1 through 20 (of 20 total)
  • @paulhastings0

    Participant

    Who’s your webhost?

    And what versions of WP and BP are you running?

    @cixxy

    Member

    my webhost : http://downtownhost.com

    WP 3.0
    BP 1.2.5.2
    Album 0.1.9 Nightly ver

    @cixxy

    Member

    OK i fixed the error myself by removing these lines from sub-upload-http.php , but also effectively getting rid of the size cap altogether.

    if ( $_FILES > BP_AVATAR_ORIGINAL_MAX_FILESIZE ) {
    $feedback_message[] = sprintf( __( ‘The file you uploaded is too big. Please upload a file under %s’, ‘buddypress’), size_format(CORE_MAX_FILE_SIZE) );
    $error_flag = true;
    }

    can upload every file now! Should I just replace BP_AVATAR_ORIGINAL_MAX_FILESIZE with a integer filesize within the PHP file instead? And If so how?

    Also, when the plugin updates, I’d have to re-edit this file , correct?

    @boonebgorges

    Keymaster

    Try putting a line in your wp-config.php file that says define( 'BP_AVATAR_ORIGINAL_MAX_FILESIZE', 10 * 1024 ); Change 10 * 1024 to whatever integer you’d like.

    @cixxy

    Member

    thanks, i will try that. 1024 being 1 MB , correct?

    @boonebgorges

    Keymaster

    Yup, that’s right. BTW putting it in wp-config.php means that it won’t get overwritten when you upgrade BP or WP. Generally, wherever you see a constant in the code (with a CAPITAL_LETTER_NAME like that), you can do something similar to override the defaults in a future-proof way.

    @cixxy

    Member

    I tried uploading a 5mb and a 250kb file with that parameter, didnt work. Anyone know where BP_AVATAR_ORIGINAL_MAX_FILESIZE is defined in the PHP files?

    @boonebgorges

    Keymaster

    It’s defined in bp-core/bp-core-avatars.php, around line 34. But you’ll see that it shouldn’t be defining it there if you’ve already defined it in wp-config.php

    @cixxy

    Member

    thanks I’ll try changing it there.
    Defining it in wp-config didnt help obviously. i also tried define(‘BP_AVATAR_ORIGINAL_MAX_FILESIZE’, ‘10240’); to no avail.

    @cixxy

    Member

    Ok it says this

    if ( !defined( ‘BP_AVATAR_ORIGINAL_MAX_FILESIZE’ ) ) {
    if ( !$bp->site_options )
    define( ‘BP_AVATAR_ORIGINAL_MAX_FILESIZE’, 5120000 ); /* 5mb */
    else
    define( ‘BP_AVATAR_ORIGINAL_MAX_FILESIZE’, $bp->site_options * 1024 );
    }

    So the integer you gave me was wrong haha.. its in bytes

    So I think its this line that’s screwing it up: define( ‘BP_AVATAR_ORIGINAL_MAX_FILESIZE’, $bp->site_options * 1024 );

    @boonebgorges

    Keymaster

    oops, I might have given you the wrong number.

    But you’re wrong that that line is screwing it up. wp-config.php is loaded before this file. So if you’ve defined the constant there, it’ll never get past the first conditional in the code you just pasted.

    @cixxy

    Member

    Omfg ITS WORK!!!

    define(‘BP_AVATAR_ORIGINAL_MAX_FILESIZE’, 5120000);

    in wp-config XD

    Cheers man!

    @boonebgorges

    Keymaster

    You got it!

    @paulhastings0

    Participant

    Glad you got it working.

    @cixxy

    Member

    But why was i the only one with this problem? very strange… All the other guys with this problem had a server side issue.

    @boonebgorges

    Keymaster

    5MB for an avatar pic is pretty big. Maybe that’s the problem.

    @cixxy

    Member

    So why didnt you guys get it, was your buddypress configured differently? I mean I havent even tweaked the settings of BP

    @hnla

    Participant

    TBH you should be addressing the file itself if it is 5MB as 5MB for a web graphic is not simply ‘pretty big’ it’s far too big! I would be editing the file and compressing before attempting to upload. An avatar for web display is generally around 80px x 80px even if you double that size and whether you are talking gifs or jpgs a file of those dimensions at a web resolution of 72dpi should come out at around ~10k even a large jpg image at say 600px shouldn’t really exceed the ~50k mark and you would have 100 of those for your 5MB.

    Uploading large files unnecessarily just drains data transfer, soaks up bandwidth and asks the server to have do do more work in compressing and resizing the image than it need do.

    @cixxy

    Member

    Ok as I said , I didnt even tweak the settings of BP, it came 5MB by default. And as you see it’s linked to Album+ for some strange, and stupid? reason. So if I were to make this smaller, there goes my upload size limit, Lol.

    @bbes

    Participant

    Does anyone know how to change the upload size for BP Group Documents? I’m trying to upload a 3.6 MB file.

Viewing 20 replies - 1 through 20 (of 20 total)
  • The topic ‘Hey, Upload size limit issues please help!’ is closed to new replies.
Skip to toolbar