Bug #72667 [Opn->Csd]: opendir() with ftp:// attempts to open data stream for non-existent directories
| From: | nikic@php.net | Date: | Wed, 27 Jul 2016 14:01:01 +0000 |
| Subject: | Bug #72667 [Opn->Csd]: opendir() with ftp:// attempts to open data stream for non-existent directories | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-202637@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=72667&edit=1
ID: 72667
Updated by: nikic@php.net
Reported by: vhu at iki dot fi
Summary: opendir() with ftp:// attempts to open data stream
for non-existent directories
-Status: Open
+Status: Closed
Type: Bug
Package: Directory function related
Operating System: all
PHP Version: 7.1Git-2016-07-25 (Git)
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of vhu@iki.fi
Revision: http://git.php.net/?p=php-src.git;a=commit;h=cce457c68c3a15efafea3a30560c54f74f3f5ee1
Log: Fix bug #72667
Previous Comments:
------------------------------------------------------------------------
[2016-07-25 11:38:37] vhu at iki dot fi
Clarified summary.
------------------------------------------------------------------------
[2016-07-25 10:21:06] vhu at iki dot fi
Description:
------------
opendir() attempts to open FTP data stream for non-existent directories when used with ftp:// wrapper.
Test script:
---------------
var_dump(opendir("ftp://example.com/nonexistent"));
var_dump(opendir("ftp://example.com/"));
Expected result:
----------------
Warning: opendir(ftp://example.com/nonexistent): failed to open dir: FTP server reports 250 The
system cannot find the file specified.
in test.php on line 2
bool(false)
resource(8) of type (stream)
Actual result:
--------------
PHP Warning: opendir(): connect() failed: Connection timed out in test.php on line 2
PHP Warning: opendir(ftp://example.com/nonexistent): failed to open dir: FTP server reports 200
Type set to A.
in test.php on line 2
bool(false)
resource(9) of type (stream)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=72667&edit=1