|  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
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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: stano dot lacko at gmail dot com
New email:
PHP Version: OS:


 [2015-08-05 19:23 UTC] stano dot lacko at gmail dot com
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


Add a Patch

Pull Requests

Pull requests:

Add a Pull Request


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]
-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]
-Status: Open +Status: Closed -Assigned To: +Assigned To: nikic
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Mar 02 08:01:29 2024 UTC