|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
Patches54431.patch (last revision 2016-07-21 08:47 UTC by vhu at iki dot fi)Pull Requests
Pull requests:
HistoryAllCommentsChangesGit/SVN commits
[2011-03-31 14:00 UTC] chrisw at networkm dot co dot uk
[2016-07-21 08:49 UTC] vhu at iki dot fi
[2016-07-23 12:08 UTC] nikic@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: nikic
[2016-07-23 12:08 UTC] nikic@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 23 21:00:01 2025 UTC |
Description: ------------ opendir() triggers 2 warnings when used with ftps:// wrapper URLs and fails. fopen() works with files contained within the directory I am trying to open. If opendir() is not designed to work with ftps://, I would request this as a feature (since ftp_ssl_open() does not work in standard Windows builds). Test script: --------------- <?php // This works $fp = fopen("ftps://$user:$pass@$host:$port/$file"); while ($part = fread($fp,1024)) $filedata .= $part; fclose($fp); print("Downloaded file:\n$filedata"); // This doesn't work, triggers 2 warnings print("\n\nDirectory listing:\n"); $dp = opendir("ftps://$user:$pass@$host:$port/"); while ($file = readdir($dp)) print("$file\n"); closedir($dp); ?> Expected result: ---------------- Downloaded file: <contents of file> Directory listing: <list of files> Actual result: -------------- Downloaded file: <contents of file> Directory listing: Warning: opendir(): SSL/TLS already set-up for this stream in <script path> on line 11 Warning: opendir(ftps://...@host:port/): failed to open dir: Unable to activate SSL mode in <script path> on line 11