The MU forums have moved to WordPress.org

Max Upload file size not working in wpmu1.2.3 (12 posts)

  1. nims
    Member
    Posted 16 years ago #

    I have set up a fresh install of WPMU at http://www.Maolik.com and just for testing purpose I have set Max Upload file size to 20KB, but it still uploads an image of around 200KB without any warning. I have tested it without administrator login.

    What could be wrong ?

  2. lunabyte
    Member
    Posted 16 years ago #

    Sounds like a server configuration, and maybe the max_upload size specified in php.ini can't be overridden.

    Just a guess though, since there isn't any other info to go on.

  3. nims
    Member
    Posted 16 years ago #

    Does it really have to do anything with php.ini file ?
    Moreover I am decreasing the file size not increasing it.
    I am trying to limit the max_upload file size in the admin CP but it doesnt work.

    DO let me know if u need more info or you can kindly check by creating a blog yourself over there. Thanks :-)

  4. Farms
    Member
    Posted 16 years ago #

    nims, you're not wrong, I just tested it and we've got exactly the same 1.2.3 problem - thanks for bringing it to everyone's attention... now, about fixing it!

  5. nims
    Member
    Posted 16 years ago #

    Well Farms, had I knew the solution, I would have definitely posted it here. But lets hope the devs or other contributors see this and post some solution :-)

  6. lunabyte
    Member
    Posted 16 years ago #

    If it's broke, add it to trac. Else it won't get any attention.

  7. nims
    Member
    Posted 16 years ago #

  8. andrewbillits
    Member
    Posted 16 years ago #

    I meant to add this to trac days ago. Unless there is something really fancy going on, it doesn't look like there is anything checking the file size in the upload function.

    Thanks,
    Andrew

  9. nims
    Member
    Posted 16 years ago #

    How would we know if this issue has been rectified. Do we need to keep track of the trac or we get an email telling it has been done. Just curious as I cannot start my blogs without this.

  10. lunabyte
    Member
    Posted 16 years ago #

    Follow it in trac.

  11. macgruder
    Member
    Posted 16 years ago #

    Here is a fix:

    Go to

    /htdocs/wp-admin/upload-functions.php

    Around Line 211 AFTER

    $file = wp_handle_upload($_FILES['image'], $overrides);

    ADD these TWO lines:

    if( isset( $file[ 'error' ] ) == false )
    $file[ 'error' ] = apply_filters( "check_uploaded_file", $file[ 'error' ] );

    I'll make a separate thread about this too.

  12. donncha
    Key Master
    Posted 16 years ago #

    check http://trac.mu.wordpress.org/ticket/378 - I just fixed this in SVN

About this Topic