title: Connecting with ftp_connect but can not login PHP
body: <p>I am creating an application which connects to FTP(with secured connection). This Might be stupid question but I really need help. My query is-</p>
  
  <p>I am creating application to connect to FTP server which is secured(FTP-SSL / FTP Secure). I have used two approaches</p>
  
  <ol>
  <li>ftp_connect()</li>
  <li>ftp_ssl_connect()</li>
  </ol>
  
  <p><strong>Approach 1 - ftp_connect()</strong></p>
  
  <pre><code>&lt;?php
          $ftp_server = "ftp.xxx.xxx";
          $ftp_user_name = "xxx";
          $ftp_user_pass = "xxxxxx";
  
          $conn_id = ftp_connect($ftp_server) or die("Couldn't connect to $ftp_server");
          ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
  ?&gt;
  </code></pre>
  
  <p>My problem is, connection is established but when I try to login it is throwing this error. When I remove <code>ftp_login()</code> I am not getting any error. 
     I know this is because of ftps. That is why I used second approach.</p>
  
  <blockquote>
    <p>Warning: ftp_login(): Sorry, cleartext sessions are not accepted on this server.</p>
  </blockquote>
  
  <p><strong>Approach 2 - ftp_ssl_connect()</strong></p>
  
  <pre><code>&lt;?php
          $ftp_host = 'ftp.xxx.xxx';
          $ftp_user = 'xxxxxx';
          $ftp_password = 'xxxxxx';
  
          var_dump(function_exists('ftp_ssl_connect'));
  
          if(function_exists('ftp_ssl_connect'))
          {
              $ftp_connection = @ftp_ssl_connect($this-&gt;ftp_host);
          }
  
          if($ftp_connection)
          {
              ftp_login($ftp_connection, $this-&gt;ftp_user, $this-&gt;ftp_password);
          }
      ?&gt; 
  </code></pre>
  
  <p>I used this approach <code>ftp_ssl_connect()</code> to connect ftp (with secured connection server). But the statement is printing bool(False). This means ftp_ssl_connect() is not available to use.</p>
  
  <p>What should I do to connect ftp (with secured connection) server?. I tried replacing <em>ftps</em> over <em>ftp</em> in URL. it is showing the same error.</p>
  
  <p><strong>Update - 1</strong>
  application will be hosted at Linux server. I am developing and testing application on windows 7 machine.</p>