Sorry... I can't deal with all the SPAM so until I can find a better solution for the forums, I'm locking them down. For now please use awesome services like stackoverflow.com for community support. Thanks.
This forum is a community forum meant for users of the plugin to collaborate and help solve issues with implementation, etc. Unfortunately, as the creator of the plugin, I do not have much time to attend to every request here as this is only a side project and I must work a full-time job to provide for my family. This is how I keep the Flash version free and the HTML5 version low cost.
Uploading large files hangs
  • Hi all,

    I have installed and tested uploading small files and all works fine. As soon as I try upload larger files (from around 2MB up) the script shows 100% and just hangs... it never shows complete and clears.

    I have increased the limits to allow me to upload larger files in the .htaccess file and have tested uploading files with a basic plain html and php script and I can upload 4MB files no problems. I have also set the sizeLimit up... here are the settings:


    $(document).ready(function() {
    $(\"#uploadify\").uploadify({
    'uploader' : '/scripts/uploadify.swf',
    'script' : '/scripts/uploadify.php',
    'cancelImg' : '/images/cancel.png',
    'folder' : '<?= $folder ?>',
    'queueID' : 'fileQueue',
    'fileDesc' : 'Print Job Files',
    'fileExt' : '*.pdf;*.ai;*.eps;*.doc;*.docx;*.jpg',
    'multi' : true,
    'sizeLimit' : 10240000000
    });
    });


    Any ideas?
    Ta.
  • Anyone have any ideas?

    I am using the latest version and my phpinfo show that all the upload limits are big enough. Would it have something to do with the flash file?
  • I set the LimitRequestBody (in .htaccess) to unlimited and tested again, but still had no joy:


    php_value upload_max_filesize 100M
    php_value post_max_size 100M
    php_value max_execution_time 1200

    LimitRequestBody 0


    Not sure if I am able to set client_max_body_size in the .htaccess though...

    Still hanging...
  • Any ideas anyone?

    Still not working with large files...
  • chris said:
    Any ideas anyone?

    Still not working with large files...


    Could the PHP script be timing out? How much time elapses until the upload hangs? Look at PHP's set_time_limit command. http://us2.php.net/manual/en/function.set-time-limit.php
    Note: If you are on a hosted server that has safe_mode turned on, this command will have no affect.
  • Isn't that what setting "php_value max_execution_time 1200" in the .htaccess file does?
  • chris said:
    Isn't that what setting "php_value max_execution_time 1200" in the .htaccess file does?


    Sorry, I missed those details. I also see that you've set LimitRequestBody, so I don't have an idea.
  • I already had set_time_limit in the uploadify.php file and I have added an ini_set for execution time:


    set_time_limit(1200);
    ini_set('max_execution_time', 1200);


    Still doesn't complete the upload... :(
  • bdp said:
    [quote="chris"]Isn't that what setting "php_value max_execution_time 1200" in the .htaccess file does?


    Sorry, I missed those details. I also see that you've set LimitRequestBody, so I don't have an idea.[/quote]

    No probs, thanks for trying!
  • Right! Good news...

    The uploadify script is working fine. It turned out to be the file that I was testing. It was a 4Mb .pdf file that just would not upload. I can't believe that this file that I was using for testing that was failing. It opens up fine but won't uploadify... strange! Anyway, it is working fine.

    Thanks for all your help guys!
  • I'm not sure why I'm still getting 500 internal server error !!? neidea ?
  • First thing first
    commands like
    ini_set('max_execution_time', 1200);

    do not work in every php environment.
    It is always a good idea to test your ini_set command on a blank page like this:

    ini_set('max_execution_time', 1200);
    echo ini_get('max_execution_time');

    If the above code works fine and echoes 1200 then you are in good shape. Go ahead and use ini_set. If not, then you'll have to figure out what is preventing ini_set to kick in. Possibly you might have "safe_mode" turned on. You can try to turn it off. But it won't be easy on a shared environment.


    One solution idea which I see was not mentioned on this post is increasing the memory limit:
    ini_set('memory_limit', '256M');

    In order to process 5MB images I needed to increase my memory limit to 256MB. (I tried 64,128,256 and 256 worked. So the true "necessary" value is somewhere between 128 and 256. You can try for yourself.) Otherwise the server would give out a "500 http error", which is pretty hard to figure out why you had this error in the first place.

    On our site evlilik sitesi http://www.pembepanjur.com we are using uploadify and so far we had over 30.000 images uploaded. We are pretty happy with it. Though we would love to see more detailed documentation and more updates, and more release notes. This is a great project which I hope would be improved. And I hope we can start donating to the project at some point :)
  • Another quick note in case anyone is having problems (I was); PHP requires post_max_size to be larger than upload_max_filesize. Additionally, memory_limit should be larger than both. See here: http://php.net/manual/en/ini.core.php (scroll down to the post_max_size description).
  • I managed to solve this problem by adding the following to my php.ini file:

    memory_limit = 256M
    upload_max_filesize = 256M
    post_max_size = 256M
    max_execution_time = 300
    max_input_time = 300


    I can now upload 6MB files, haven't tested anything larger than that.

    Hope that helps.
  • The user and all related content has been deleted.