title: Getting warning on ftp_get() in PHP
body: <p>I try to retrieve a text file using ftp_get() 
  and when I execute the script I get warning:</p>
  
  <pre><code>ftp_get() [function.ftp-get]: Can't open data connection
  </code></pre>
  
  <p>Can some one give some clue what is wrong. This was working on my previous hosting/server since I moved it it broke. Are there some specific PHP configurations. I checked the phpinfo and the FTP support is enabled.
  The connection got resource id and the username, password and ftp host work through CuteFTP. </p>
  
  <pre><code>function _getFtpFile( $fileName = '' ) {
      if($fileName == '') {
          return false;
      }
  
      $model = $this-&gt;getModel();
      $params =&amp; $model-&gt;getParams();
  
      $vebraHost = $params-&gt;get('vebra_host');
      $vebraUser = $params-&gt;get('vebra_username');
      $vebraPass = $params-&gt;get('vebra_password');
      $localFile = JPATH_BASE.'/tmp/tmp.csv';
  
      // Delete the file in case it exists
      @unlink($localFile);
  
      // set up basic connection
      $connId = ftp_connect($vebraHost);
  
      // login with username and password
      $loginResult = ftp_login($connId, $vebraUser, $vebraPass);
  
      // turn on passive mode transfers
      ftp_pasv($connId, true);
  
      // try to download $server_file and save to $localFile
      if (!ftp_get($connId, $localFile, $fileName, FTP_BINARY)) {
          $file = false;
      } else {
          $file = $localFile;
      }
  
      // close the connection
      ftp_close($connId);
  
      return $file;
  }
  </code></pre>