From:             ca50015 at yahoo dot com
Operating system: windows 98 se
PHP version:      5.0.0
PHP Bug Type:     Directory function related
Bug description:  mkdir() failed to create dir

Description:
------------
mkdir() wont work properly when its parameter is a numeric string

Reproduce code:
---------------
<?php
$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"))
                {
                        mkdir("./$dir_name");
                }
                chdir("./$dir_name");
        }
        chdir($cwd);
}
?>


Expected result:
----------------
It should create two directory trees under current dir:
   1/0/0001
   1/1/0001




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


-- 
Edit bug report at http://bugs.php.net/?id=29274&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=29274&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=29274&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=29274&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=29274&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=29274&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=29274&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=29274&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=29274&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=29274&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=29274&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=29274&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=29274&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29274&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=29274&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=29274&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=29274&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=29274&r=float

Reply via email to