title: FTP corrupts files after certain delay and/or size
body: <p>i am building a few Excel files with PHPExcel and store them on the server running the script.
  This part works well.</p>
  
  <p>i then try to send them to my client's ftp server using ftp_put, but the files arrive corrupted to the server.</p>
  
  <p>When opening them after downloading them back from the ftp server with Filezilla, i get an error saying that there is a problem with the content of the file and that they can try to repair it as much as they can if i wish so. Doing so doesn't help.</p>
  
  <p><b>if the excel file is under 100-120k its sent uncorrupted, bigger than that it gets corrupted.</b></p>
  
  <p>script to send via ftp</p>
  
  <pre><code>$conn_id = ftp_connect($hostFTP);
  if($login_result = ftp_login($conn_id, $userFTP, $passwordFTP))
  {
      ftp_pasv($conn_id, true);
      if(ftp_put($conn_id, $remote_path.$output_filename, $localPath.$output_filename, FTP_BINARY))
      {
          $log = new Logs("listes.log", "Uploaded $output_filename");
      }
      else
      {
          $log = new Logs("listes.log", "FAIL Uploading $output_filename");
      }
      ftp_close($conn_id);
  }
  </code></pre>
  
  <p>Am i doing something wrong? what can i do?</p>
  
  <p>edit :  </p>
  
  <p>comparing the files in text show some differences starting at line 231, which i assume is around the 100-120k mark</p>
  
  <p>tried with an image(jpg) and it also gets corrupted (top of image is fine, but at a point it just corrupts and the rest of the image is pretty much single colored), so problem isnt with excel;</p>
  
  <p>Is it possible that the server (opensuse) limits ftp? and if so how?</p>