Skip to:
Content
Pages
Categories
Search
Top
Bottom

Upload Size Limits?

  • Avatar of dannypage
    dannypage
    Member

    @dannypage

    Hi all,
    I have just installed BP Album 0.1.8.8 on 3.1

    I am getting the error “Please upload only JPG, GIF or PNG photos.” But it seems only when uploading larger images. I can upload small images without a problem.

    Any ideas? I assume this is a server restriction? Any help would be much appreciated.

    Site is http://www.classicbikenetwork.com

    Thanks,
    Danny Page

Viewing 21 replies - 1 through 21 (of 21 total)
  • Avatar of mike-seo
    mike-seo
    Member

    @mike-seo

    I am also facing this same issue :(

    if anyone is having problem regarding server upload limit, i can help out. i will tell you how to increase the limit

    Avatar of dannypage
    dannypage
    Member

    @dannypage

    ok… please tell us.

    Avatar of foxly
    foxly
    Participant

    @foxly

    @dannypage
    @naijaping
    @mike-seo

    What that means is they changed something in WP 3.1 or BP 1.2.8 so that the correct error message isn’t getting sent back to bp-album. In otherwords, “Please upload only JPG, GIF or PNG photos.” really means “Please upload only JPG, GIF or PNG photos, under X megabytes in size”, where “X” is the max upload file size for your site.

    You can change it on the bp-album admin menu, but you also have to set it on the WP admin menu. It uses the LOWER of the two settings.

    ^F^

    Avatar of dannypage
    dannypage
    Member

    @dannypage

    @foxly

    Thanks for the reply.

    I cannot find a size limit on the bp-album or in the wp-admin? I can only find the x and y pixel resizing and number of images.

    I have been told about adding a php.ini file but cannot seem to get that to work either..

    Am I missing something?

    Thanks,
    Danny

    Avatar of dannypage
    dannypage
    Member

    @dannypage

    Hi All,

    Just thought I would post my findings, I created the php.ini file in the root and although it did change the media upload size in wordpress, it did not work for BP Album. I have put the same php.ini file into the bp-album file and that has solved the issue!

    php.ini file contains:

    wp_memory_limit=128M;
    upload_max_filesize=128M;
    post_max_size=20M;

    Thanks for all of your help
    @naijaping
    @mike-seo
    @foxly

    Avatar of dba2k10
    dba2k10
    Member

    @dba2k10

    For anyone having these issues without the BuddyPress Media plugin : I downgraded buddpress to 1.2.7 and that was simply the easiest fix.

    Avatar of dannypage
    dannypage
    Member

    @dannypage

    @foxly

    Unfortunately the issue was not completely solved. I read elsewhere that there is a problem when uploading .JPG images but not .jpg

    The lowercase does work. Any way to solve this?

    Thanks,
    Danny

    Avatar of foxly
    foxly
    Participant

    @foxly

    @dannypage

    I just posted a fix on the SVN trunk. If you replace the file called “bp-album-screens.php” with this one, it should correctly handle files with upper-case extensions.

    Thanks!

    ^F^

    @foxly

    Hi, I have replace bp-album-screens.php with this one.
    When I have loaded a picture bp writes that the picture is loaded, but it is not visible

    Avatar of foxly
    foxly
    Participant

    @foxly

    @polkin

    You probably need to use the URL Re-mapper feature of the plugin.

    ^F^

    BTW, if you are getting the “Please upload only JPG, GIF or PNG photos.” when users try to upload an avatar image with an uppercase extension, you need to change line 525 in `/plugins/buddypress/bp-core/bp-core-avatars.php` to:

    `if ( ( !empty( $file ) && !preg_match(‘/(jpe?g|gif|png)$/i’, $file ) ) || !preg_match( ‘/(jpe?g|gif|png)$/i’, $file ) )`

    @foxly:
    In your fix, shouldn’t you be using `$_FILES` instead of `$file` at line 315?

    thanx for the listing from dannypage – helped me a lot with bp-group-documents!

    it works but I couldn’t upload documents larger than 10Mb – until I found your script for bp-album and used it for bp-group-documents … now I have successfully uploaded a file with 50Mb to bp-group-documents!

    Create the php.ini file in the root-folder and put the same php.ini file into the bp-group-documents-folder!

    php.ini file contains:

    wp_memory_limit=10000M;
    upload_max_filesize=10000M;
    post_max_size=2000M;

    ps: buuut ((( – didn’t work with another file of 450Mb – anybody has an idea what that could be?

    Avatar of foxly
    foxly
    Participant

    @foxly

    @friederb

    What, precisely, are you uploading that requires 450MB files?

    ^F^

    Avatar of Tony Locke
    Tony Locke
    Participant

    @tonylocke

    I understand all the conversation, but don’t understand implementation. What would be the steps to actually do the fixes you guys suggest?

    1. I don’t know how to create a file called php.ini
    2. I wouldn’t know where to put the file or how to put it there.
    3. I downloaded the nightly build from http://code.google.com/p/buddypress-media/source/browse/bp_album/trunk/includes/bp-album-screens.php?edit=1
    but don’t know where to stick it.
    4. My BP-album admin doesn’t have an option for larger size pics.

    I know this lack of knowledge will make someone angry. I am learning as I go. I make WordPress themes with Artisteer. I’ve got paid to do a dozen. I loaded them up and get them working. I have a Godaddy account and I am learning FileZilla. Would you be willing to communicate this fix in ten easy steps?

    My site is http://www.OpenVolunteers.com and I’ve spent 4 hours trying to figure out this one issue. Killing me. All my friends are trying to make accounts as a favor for me to test things. They click out trying, give up, because the avatar upload doesn’t work.

    What good is software if it doesn’t work?

    Avatar of foxly
    foxly
    Participant

    @foxly

    @tonylocke

    Hi Tony,

    It sounds like you have several different problems happening simultaneously.

    1) “Avatar upload doesn’t work”

    I *think* this is a problem in BuddyPress, not BP-Album, because our plugin doesn’t handle avatar uploads. I seem to remember BuddyPress had a defect where it didn’t like filename extensions that were either “ALL CAPS” or “all lowercase”. So try uploading a file like “test.jpg” and then a file like “test.JPG” and see if that changes anything.

    2) “I don’t know how to create a file called php.ini”

    Editing this file on a PHP install is equivalent to editing the Windows registry. Unless you have your own dedicated server, you probably don’t have access to the php.ini file, nor *should* you have access to this file … ;)

    3) “I downloaded the nightly build from…”

    You don’t want to run the nightly build on a production site. Grab a copy of the release version from the WordPress plugin site, upload, activate, and you’re good to go.

    4) “I know this lack of knowledge will make someone angry. I am learning as I go. I make WordPress themes with…”

    Why on earth would would someone politely asking for help make us angry? Compared to many help requests we’ve handled in the past, you’re being a “model citizen” … :) Just try to keep your requests in *this* forum related to BP-Album/BP-Media. There are other forums on buddypress.org with *ten times* as many developers that can help you get the core BuddyPress plugin setup and help you build themes.

    Thanks!

    ^F^

    Avatar of Tony Locke
    Tony Locke
    Participant

    @tonylocke

    Dude! You have won a fan for life. Thanks.

    I tried your suggestions. All CAPS doesn’t upload. Lowercase does.

    So now I got to find what software saves in lower and which in upper. Windows Photo Center saves in lower case extensions. Paint and Microsoft Photo editor saves a file with upper extensions.

    The bigger problem is that I can’t launch a website and hope to attract tens of thousands of people, placing on them the responsibility to figure this out. They hit the “close screen” and move on when tripping over this sort of problem.

    Your guidance was excellent to steer me away from the PHP.ini and nightly build.

    Who can solve this upper case issue? I found a plugin to solve new users who type their username with upper case letters.

    How do I solve the non-compatible upper case file extension? I am not asking you to solve it. I know I am on the wrong Forum. Just steer me the right direction. Do I hire a programmer to do a custom change – maybe a $150 dollar job? This has to be solved. It makes too many people stop the registration process.

    Where do I go from here?

    Sincerely, Tony Locke
    http://www.SuccessinService.com and http://www.FirstPresTucker.org

    Avatar of foxly
    foxly
    Participant

    @foxly

    @tonylocke

    It will probably just start working in BuddyPress 1.5. I’m pretty sure they have it fixed in the new beta.

    http://code.google.com/p/buddypress-media/wiki/DOCS_BP_OnePointFive

    ^F^

    Avatar of Tony Locke
    Tony Locke
    Participant

    @tonylocke

    I found this on another blog. Solved it.

    “Please upload only JPG, GIF or PNG photos.” when users try to upload an avatar image with an uppercase extension, you need to change line 525 in /plugins/buddypress/bp-core/bp-core-avatars.php to:

    if ( ( !empty( $file ) && !preg_match(‘/(jpe?g|gif|png)$/i’, $file ) ) || !preg_match( ‘/(jpe?g|gif|png)$/i’, $file ) )

    To be more specific, try the following if you are having problems with uploading uppercase:

    Line 525 of /bp-core/bp-core-avatars.php should be changed from:

    {{{

    if ( ( !empty( $file ) &&
    !preg_match(‘/(jpe?g|gif|png)$/’, $file ) ) ||
    !preg_match( ‘/(jpe?g|gif|png)$/’, $file ) )

    }}}

    to a case insensitive preg_match.

    {{{

    if ( ( !empty( $file ) &&
    !preg_match(‘/(jpe?g|gif|png)$/i’, $file ) ) ||
    !preg_match( ‘/(jpe?g|gif|png)$/i’, $file ) )

    }}}

    Hope this helps gents! Also, make sure to change your media sizes in your wordpress general settings under media, some errors are related to size – I went with: Thumbs = 300 medium = 1024 large = 2000

    Avatar of foxly
    foxly
    Participant

    @foxly

    @tonylocke @Mene12

    Directly editing the BuddyPress core files is generally a bad idea unless you know *exactly* what you’re doing. Based on our testing, this problem is fixed in the new BuddyPress 1.5 release, so this problem will basically fix itself once 1.5 isreleased.

    Thanks!

    ^F^

Viewing 21 replies - 1 through 21 (of 21 total)

You must be logged in to reply to this topic.