php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #70195 Cannot upload file using ftp_put to FTPES with require_ssl_reuse
Submitted: 2015-08-05 19:23 UTC Modified: 2016-08-13 19:47 UTC
Votes:6
Avg. Score:4.8 ± 0.4
Reproduced:5 of 5 (100.0%)
Same Version:3 (60.0%)
Same OS:4 (80.0%)
From: stano dot lacko at gmail dot com Assigned: nikic (profile)
Status: Closed Package: FTP related
PHP Version: 5.6.11 OS: Linux
Private report: No CVE-ID: None
 [2015-08-05 19:23 UTC] stano dot lacko at gmail dot com
Description:
------------
There is not possible to upload file to FTP server with explicit SSL on FTP servers based on VSFTP, where require_ssl_reuse is set to on.

ftp_fput(): SSL connection failed; session reuse required: see require_ssl_reuse option in vsftpd.conf man page


Test script:
---------------
$ftp = ftp_ssl_connect($host, 21, 180);
if ($ftp && ftp_login($ftp,$login,$pass)) {
  if (ftp_put($ftp, $dest_file, $file, FTP_BINARY)) {
    // ok
  } else {
    // error
  }
} else {
  // file error
}


Expected result:
----------------
I want to get true from ftp_fput


Patches

Pull Requests

Pull requests:

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-06-14 13:58 UTC] benedict dot singer at automattic dot com
This affects any commands that require the data connection, and thus completely breaks FTPS when connecting to servers that require this. Many implementations now require this by default, and server operators are understandably reluctant to disable it.
 [2016-08-13 19:34 UTC] nikic@php.net
-Summary: Cannot upload file fit ftp_put to FTPES with require_ssl_reuse +Summary: Cannot upload file using ftp_put to FTPES with require_ssl_reuse
 [2016-08-13 19:47 UTC] nikic@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: nikic
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 30 14:01:28 2024 UTC