Bug #72667 [NEW]: opendir() attempts to open FTP data stream for non-existent directories
From: vhu at iki dot fi
Operating system: all
PHP version: 7.1Git-2016-07-25 (Git)
Package: Directory function related
Bug Type: Bug
Bug description:opendir() attempts to open FTP data stream for non-existent directories
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 bug report at https://bugs.php.net/bug.php?id=72667&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=72667&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=72667&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=72667&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=72667&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=72667&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=72667&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=72667&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=72667&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=72667&r=support
Expected behavior: https://bugs.php.net/fix.php?id=72667&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=72667&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=72667&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=72667&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=72667&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=72667&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=72667&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=72667&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=72667&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=72667&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=72667&r=mysqlcfg
Thread (3 messages)
- vhu at iki dot fi