|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #29274 mkdir() failed to create dir
Submitted: 2004-07-20 10:59 UTC Modified: 2005-02-22 01:00 UTC
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: ca50015 at yahoo dot com Assigned:
Status: No Feedback Package: Filesystem function related
PHP Version: 5.0.0 OS: windows 98 se
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: ca50015 at yahoo dot com
New email:
PHP Version: OS:


 [2004-07-20 10:59 UTC] ca50015 at yahoo dot com
mkdir() wont work properly when its parameter is a numeric string

Reproduce code:
$path = array('1/0/0001', '1/1/0001');
$cwd = getcwd();
foreach ($path as $p)
	$p = explode('/', $p);
	foreach ($p as $dir_name)
		if (! is_dir("./$dir_name"))

Expected result:
It should create two directory trees under current dir:

Actual result:
and the result is:
   1/0/0001    (correct)
   1/0001      (should be '1/1/0001')


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-02-22 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Fri Mar 05 20:01:24 2021 UTC