title: PHP ftp_login fails even with correct credentials
body: <p>I'm attempting an FTP login via PHP with this code:</p>
  
  <pre><code>$ftp_conn = ftp_connect('XXX.XX.XXX.XXX') or die("Could not connect");
  $login = ftp_login($ftp_conn, 'USER', 'PASS');
  var_dump($login);
  </code></pre>
  
  <p>But I keep getting this error:</p>
  
  <blockquote>
    <p>ftp_login(): Login or password incorrect!</p>
  </blockquote>
  
  <p>However, I can successfully use these credentials with an FTP program such as FileZilla. Are my credentials actually wrong?</p>
  
  <p>Any ideas?</p>
  
  
  
  <p>FileZilla log file:</p>
  
  <pre class="lang-none prettyprint-override"><code>Status: Disconnected from server
  Status: Connecting to XXX.XX.XXX.XXX:21...
  Status: Connection established, waiting for welcome message...
  Response:   220 Welcome to Claytons FTPS
  Command:    AUTH TLS
  Response:   234 Using authentication type TLS
  Status: Initializing TLS...
  Status: Verifying certificate...
  Status: TLS connection established.
  Command:    USER alfresco
  Response:   331 Password required for alfresco
  Command:    PASS **********
  Response:   230 Logged on
  </code></pre>
  
  <p>FileZilla log file with disabled encryption:</p>
  
  <pre class="lang-none prettyprint-override"><code>Status: Disconnected from server
  Status: Connecting to XXX.XX.XXX.XXX:21...
  Status: Connection established, waiting for welcome message...
  Response:   220 Welcome to Claytons FTPS
  Command:    USER alfresco
  Response:   331 This server does not allow plain FTP. You have to use FTP over TLS.
  Command:    PASS **********
  Response:   530 Login or password incorrect!
  Error:  Critical error: Could not connect to server
  </code></pre>