• in addgallery.php, there is this line:

    <?php echo min((floor( wp_max_upload_size() * 0.99 / 1024 / 1024 ) – 1), 8); ?>Mb

    It feeds a javascripts for Plupload based upload (the flash plugin multiple files upload) in FLAgallery. The code above verifies if the files the user is adding to the uploading queue are within limits of upload_max_filesize (a global setting in php.ini)

    If you are on shared hosting, you have no control over upload_max_filesize. If your hosting provider has left it to some default size, which seems to be 2 MB, you will *not* be able to upload any file at all, no matter how small.

    The effect: you are choosing local files to upload in FLAgallery: Manage galleries — choose gallery — button “Switch to Plupload based upload” — Add images — Add files — select file(s) — click Open

    At this moment, you will get a JS pop-up “File too large.”. When you close it, a similar error is shown on the page in the space below file queue pane.

    The reason? Evaluate the result of the expression above with 2M (which according to a function in wp-content/media.php) is equal to 2097152 bytes.

    The expression result is 0, i.e. your max upload fie size is zero!

    http://wordpress.org/plugins/flash-album-gallery/

Viewing 3 replies - 1 through 3 (of 3 total)
  • I too have been receiving this error for quite a while.

    I have no idea how to fix it.

    Thread Starter kvguser

    (@kvguser)

    1) if you have control over php.ini, or any way to add settings to it, change upload_max_filesize to at least 3M

    2) you will find a lot of articles claiming these settings can be controlled by entries in .htaccess or by adding ini_set lines in your php code – didnt work for me

    3) last resort:

    replace
    <?php echo min((floor( wp_max_upload_size() * 0.99 / 1024 / 1024 ) - 1), 8); ?>
    with
    a number , e.g. 2, 5, 10 (designates MBytes max file upload size)

    Thread Starter kvguser

    (@kvguser)

    confirmed – got my hosting provider up the value from 2M to 8M: no problems anymore!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Problem if max upload size less than 2M’ is closed to new replies.