Bug #72667 [Opn]: opendir() with ftp:// attempts to open data stream for non-existent directories

From: Date: Mon, 25 Jul 2016 11:38:37 +0000
Subject: Bug #72667 [Opn]: 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-202573@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 User updated by: vhu at iki dot fi Reported by: vhu at iki dot fi -Summary: opendir() attempts to open FTP data stream for non-existent directories +Summary: opendir() with ftp:// attempts to open data stream for non-existent directories Status: Open 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: Clarified summary. Previous Comments: ------------------------------------------------------------------------ [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

« previous php.bugs (#202573) next »