Bug #67009 [Fbk->NoF]: ftp:// stream wrapper doesn't work with Microsoft FTP Service

From: Date: Sun, 28 Feb 2021 04:22:13 +0000
Subject: Bug #67009 [Fbk->NoF]: ftp:// stream wrapper doesn't work with Microsoft FTP Service
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-232428@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=67009&edit=1 ID: 67009 Updated by: php-bugs@lists.php.net Reported by: vosa at binaryparadise dot com Summary: ftp:// stream wrapper doesn't work with Microsoft FTP Service -Status: Feedback +Status: No Feedback Type: Bug Package: Streams related Operating System: debian, solaris PHP Version: Irrelevant Assigned To: cmb Private report: N New Comment: No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Re-Opened". Thank you. Previous Comments: ------------------------------------------------------------------------ [2021-02-17 15:24:35] cmb@php.net I cannot reproduce this with PHP-7.4. Is this still an issue for you with any of the actively supported PHP versions[1]? [1] <https://www.php.net/supported-versions.php> ------------------------------------------------------------------------ [2014-04-03 11:55:09] vosa at binaryparadise dot com Description: ------------ --- From manual page: http://www.php.net/wrappers.ftp --- Hi, I have some troubles with getting list of files from Microsoft's FTP server (Microsoft FTP Service) using ftp:// stream wrapper. There is difference in output, when trailing slash is used or not. I didn't see this problem, when other FTP server (i.e. pure-ftpd) is used. I tried scan directory with scandir() function, but I get same output using readdir(). See test script. There is a big problem to get list of files recursively. Directories with backslashes are incorrect and testing functions (like file_exists, is_dir, is_file) doesn't consider those paths correct. This problem occured even with DirectoryIterator with or without trailing slash. Test script: --------------- # ftp folder structure: # /test_folder # dir1 # file1 # dir2 # file2 $path = 'ftp://user:password@192.168.1.1/test_folder/'; print "with trailing slash:\n"; foreach(scandir($path) as $file) { print "$file\n"; } print "without trailing slash:\n" $path = substr($path, 0, -1); foreach(scandir($path) as $file) { print "$file\n"; } Expected result: ---------------- with trailing slash: dir1 dir2 without trailing slash: dir1 dir2 Actual result: -------------- with trailing slash: dir1 dir2 without trailing slash: test_folder\dir1 test_folder\dir2 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=67009&edit=1

« previous php.bugs (#232428) next »