Bug #77680 [PATCH]: recursive mkdir on ftp stream wrapper is incorrect

From: Date: Fri, 01 Mar 2019 15:47:19 +0000
Subject: Bug #77680 [PATCH]: recursive mkdir on ftp stream wrapper is incorrect
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-219793@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=77680&edit=1 ID: 77680 Patch added by: cmb@php.net Reported by: calin dot don at gmail dot com Summary: recursive mkdir on ftp stream wrapper is incorrect Status: Open Type: Bug Package: Directory function related PHP Version: Irrelevant Block user comment: N Private report: N New Comment: The following patch has been added/updated: Patch Name: fix-77680 Revision: 1551455239 URL: https://bugs.php.net/patch-display.php?bug=77680&patch=fix-77680&revision=1551455239 Previous Comments: ------------------------------------------------------------------------ [2019-02-28 12:38:20] calin dot don at gmail dot com Description: ------------ Recursive mkdir on ftp stream wrapper is incorrectly implemented. It issues a CWD and MKD without a required path parameter for the root folder. Test script: --------------- <?php mkdir("ftp://localhost:2121/one/two", 0755, true); Expected result: ---------------- Recursively create the directory structure. Actual result: -------------- Fails becuase it creates invalid sequence of ftp commands: 2019/02/28 13:43:12 INFO : f91b572012ab40453052: > CWD /one 2019/02/28 13:43:13 INFO : f91b572012ab40453052: < 550 Directory change to /one failed: file does not exist 2019/02/28 13:43:13 INFO : f91b572012ab40453052: > CWD 2019/02/28 13:43:13 INFO : f91b572012ab40453052: < 553 action aborted, required param missing 2019/02/28 13:43:13 INFO : f91b572012ab40453052: > MKD 2019/02/28 13:43:13 INFO : f91b572012ab40453052: < 553 action aborted, required param missing ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=77680&edit=1

« previous php.bugs (#219793) next »