#33140 [NEW]: Recursive 'mkdir' doesn't work when path includes a non-existent root folder

From: Date: Wed, 25 May 2005 16:02:41 +0000
Subject: #33140 [NEW]: Recursive 'mkdir' doesn't work when path includes a non-existent root folder
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-79489@lists.php.net to get a copy of this message
From: cbelin at free dot fr Operating system: Windows XP PHP version: 5.0.4 PHP Bug Type: Directory function related Bug description: Recursive 'mkdir' doesn't work when path includes a non-existent root folder Description: ------------ Recursive 'mkdir' (with PHP 5.0.4 and Windows) doesn't function correctly when the path includes a non-existent root folder. Reproduce code: --------------- <?php mkdir('\toto\tata\titi', 0777, true); ?> Expected result: ---------------- The following structure of directories should have been created : \toto\tata\titi Actual result: -------------- No directory being created ! The function 'mkdir' fails if directory '\toto' doesn't already exists. Instead, it outputs : Warning: mkdir() [function.mkdir]: No such file or directory in xxx.php on line xxx So I must use this code : <?php mkdir('\toto'); mkdir('\toto\tata\titi', 0777, true); ?> -- Edit bug report at http://bugs.php.net/?id=33140&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33140&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=33140&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=33140&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=33140&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=33140&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=33140&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=33140&r=needscript Try newer version: http://bugs.php.net/fix.php?id=33140&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=33140&r=support Expected behavior: http://bugs.php.net/fix.php?id=33140&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=33140&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=33140&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=33140&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33140&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=33140&r=dst IIS Stability: http://bugs.php.net/fix.php?id=33140&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=33140&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=33140&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=33140&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=33140&r=mysqlcfg

« previous php.bugs (#79489) next »