title: FTP Upload via PHP Script not working, but ftp_mkdir is working
body: <p>I am trying to upload a file to an FTP Server via a PHP script. The connection works and I can create subdirectories on the server. However ftp_put gives the following error:</p>
  
  <p><strong>Warning: ftp_nb_put() [function.ftp-nb-put]: php_connect_nonb() failed: Operation now in progress (115) in ...</strong></p>
  
  <p><strong>Warning: ftp_nb_put() [function.ftp-nb-put]: Type set to I in ....</strong></p>
  
  <p>This is the script</p>
  
  <pre><code>$conn_id = ftp_ssl_connect($ftpHost);#
  $login_result = ftp_login($conn_id, $ftpUser, $ftpPw);
  
  ftp_pasv($conn_id, true);
  
  
  // Verbindung überprüfen
  if ((!$conn_id) || (!$login_result))
      {
      // no Connection
  
      }else{
      // Connection WORKS!
  
      if(!@ftp_chdir ( $conn_id , $ftpDir )){
          // ftp_mkdir WORKS!
              @ftp_mkdir($conn_id, $ftpDir);
          }//if(!@ftp_chdir ( $conn_id , $ftpDir )){
  
  
      if (ftp_put($conn_id, $myFile, $targetfile, FTP_BINARY)) {
                   // Upload success: NOT WORKING!
  
              }       
  
  
      }
  
  }//if ((!$conn_id) || (!$login_result))
  </code></pre>
  
  <p>How can I change my script to get my desired behaviour?</p>