Commit d841b499b83 for php.net

commit d841b499b836bf447683c9408fbf881d7a0cfd18
Author: ndossche <7771979+ndossche@users.noreply.github.com>
Date:   Sun Sep 20 12:38:44 2026 +0200

    Fix GH-23619: ext/ftp: cryptic error on servers that don't support TLS session resumption on data connection

    Closes GH-23788.

diff --git a/NEWS b/NEWS
index 639a784a5a9..f76464756f3 100644
--- a/NEWS
+++ b/NEWS
@@ -24,6 +24,10 @@ PHP                                                                        NEWS
   . Fixed bug GH-23729 (DOMXPath::__construct() use-after-free during an
     evaluation). (David Carlier)

+- FTP:
+  . Fixed bug GH-23619 (cryptic error on servers that don't support TLS
+    session resumption on data connection). (ndossche)
+
 - Intl:
   . Fixed cloning IntlDateFormatter and MessageFormatter losing PHP-side state
     such as dateType, timeType, calendar and the message pattern.
diff --git a/ext/ftp/ftp.c b/ext/ftp/ftp.c
index 1345e378d8e..31ec7dc7343 100644
--- a/ext/ftp/ftp.c
+++ b/ext/ftp/ftp.c
@@ -1904,7 +1904,10 @@ data_accept(databuf_t *data, ftpbuf_t *ftp)
 		/* get the session from the control connection so we can re-use it */
 		session = ftp->last_ssl_session;
 		if (session == NULL) {
-			php_error_docref(NULL, E_WARNING, "data_accept: failed to retrieve the existing SSL session");
+			php_error_docref(NULL, E_WARNING, "data_accept: failed to retrieve the existing SSL session from the control connection. "
+											  "The server does not support TLS session resumption on the data connection, "
+											  "which is necessary to protect against session data stealing. "
+											  "PHP does not support such configuration.");
 			SSL_free(data->ssl_handle);
 			return 0;
 		}