|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-11-28 17:59 UTC] cmb@php.net
-Package: FTP related
+Package: Streams related
[2018-08-24 21:12 UTC] vhu at iki dot fi
[2018-09-04 03:00 UTC] nikic@php.net
[2018-09-04 03:00 UTC] nikic@php.net
-Status: Open
+Status: Closed
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 10:00:01 2025 UTC |
Description: ------------ In the php_stream_url_wrap_ftp function in ext/standard/ftp_fopen_wrapper.c, the tmp_line local variable is used for two distinct purposes: 1) parsing SIZE response php_stream_notify_file_size(context, file_size, tmp_line, result); 2) constructing RETR/STOR/APPE request memcpy(tmp_line, "RETR", sizeof("RETR")); ... When the function fails (jumps to errexit) the tmp_line variable is used to construct an error message: php_stream_wrapper_log_error(wrapper, options, "FTP server reports %s", tmp_line); So when the function fails only after the tmp_line is reused for purpose 2), like when a data connection cannot be opened, the error message is nonsense like: > failed to open stream: FTP server reports STOR I'm reporting this based on this http://stackoverflow.com/q/40415540/850848 The error is present at least since PHP 5.5, up to the PHP 7.0.12.