Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Stalling at 99%
  • Hi

    I've implemented uploadify and it's working great, except for larger files.

    Server is Linux hosted. Uploadify 1.6.2.

    Tested on XP, Vista with Chrome, Safari, Firefox and IE (a few versions of each).

    Occasionally when I get a file over about 1MB, the progress bar gets to 99% and nothing happens. Often the file does get placed in the correct directory, but it gets no further.

    The responses are
    1 for uploaded normally
    2 for overwrote current file
    0 for fail

    Upload.php
    if (!empty($_FILES)) {
    require_once('includes/config.php');
    $ext = explode('.',$_FILES['files']['name']);
    if (in_array(strtolower($ext[(count($ext)-1)]),$allowed)) {
    $newname = ereg_replace(\"[^A-Za-z0-9._-]\", \"\", $_FILES['files']['name']);
    if (file_exists('..'.$_GET['folder'].'/'.$newname)) $result = '2';
    else $result = '1';
    $conn_id = ftp_connect($ftp_host);
    $login_result = ftp_login($conn_id, $ftp_user, $ftp_pass);
    $tempFile = $_FILES['files']['tmp_name'];
    $targetPath = 'public_html'.$_GET['folder'];
    $targetFile = $targetPath.'/'.$newname;
    @ftp_mkdir($conn_id,$targetPath);
    if (ftp_put($conn_id,$targetFile,$tempFile,FTP_BINARY)) echo $result;
    else echo \"0\";
    ftp_close($conn_id);
    } else {
    echo \"0\";
    }
    }


    Any help would be appreciated.
  • Also... php ini settings:

    post_max_size 24M
    upload_max_filesize 32M