ID:               30981
 User updated by:  andy dot thoreson at verizon dot net
 Reported By:      andy dot thoreson at verizon dot net
 Status:           Open
 Bug Type:         Directory function related
 Operating System: Windows 2000
 PHP Version:      4.3.10RC1
 New Comment:

Did another test:
Made a directory for every letter of the alphabet and it seems as if
php just doesn't like directories that start with the letters "n", "r",
and "t". I tried renaming directories to various combinations and that
seems to remain the case.

Reset permissions to all subdirectories of c:\aaa, security set so
"everyone" has "full control".

<pre>
$bd="c:\aaa";
print "a\t[".is_dir($bd."\a")."]"."<br>";
print "b\t[".is_dir($bd."\b")."]"."<br>";
print "c\t[".is_dir($bd."\c")."]"."<br>";
print "d\t[".is_dir($bd."\d")."]"."<br>";
print "e\t[".is_dir($bd."\e")."]"."<br>";
print "f\t[".is_dir($bd."\f")."]"."<br>";
print "g\t[".is_dir($bd."\g")."]"."<br>";
print "h\t[".is_dir($bd."\h")."]"."<br>";
print "i\t[".is_dir($bd."\i")."]"."<br>";
print "j\t[".is_dir($bd."\j")."]"."<br>";
print "k\t[".is_dir($bd."\k")."]"."<br>";
print "l\t[".is_dir($bd."\l")."]"."<br>";
print "m\t[".is_dir($bd."\m")."]"."<br>";
print "n\t[".is_dir($bd."\n")."]"."<br>";
print "o\t[".is_dir($bd."\o")."]"."<br>";
print "p\t[".is_dir($bd."\p")."]"."<br>";
print "q\t[".is_dir($bd."\q")."]"."<br>";
print "r\t[".is_dir($bd."\r")."]"."<br>";
print "s\t[".is_dir($bd."\s")."]"."<br>";
print "t\t[".is_dir($bd."\t")."]"."<br>";
print "u\t[".is_dir($bd."\u")."]"."<br>";
print "v\t[".is_dir($bd."\v")."]"."<br>";
print "w\t[".is_dir($bd."\w")."]"."<br>";
print "x\t[".is_dir($bd."\x")."]"."<br>";
print "y\t[".is_dir($bd."\y")."]"."<br>";
print "z\t[".is_dir($bd."\z")."]"."<br>";
</pre>
This returns
<pre>
1a [1]
b [1]
c [1]
d [1]
e [1]
f [1]
g [1]
h [1]
i [1]
j [1]
k [1]
l [1]
m [1]
n []
o [1]
p [1]
q [1]
r []
s [1]
t []
u [1]
v [1]
w [1]
x [1]
y [1]
z [1]
</pre>


Previous Comments:
------------------------------------------------------------------------

[2004-12-04 04:59:28] andy dot thoreson at verizon dot net

Description:
------------
Was trying to write code that recursively scanned files in a directory
tree and Apache was crashing as soon as I added the recursion...but
that's another issue. In the course of debugging that, I found this one
simple bug:

I run the following code (nothing else run in php file):
print "1:[".is_dir("D:\Program Files\Apache
Group\Apache\htdocs\Utils\Old_Ocean_Backup")."]";
print "<br>";
print "2:[".is_dir("D:\Program Files\Apache
Group\Apache\htdocs\Utils\Old_Ocean_Backup\testx")."]";
print "<br>";

The first folder always comes back as existing (returns true/1). 

The second one does not. It is just a directory I made from windows
explorer (right-click, new folder).

When I rename it, in explorer, to "abc" and reload the php page (with
name changed from "testx" to "abc" in code as well), is_dir says it
*does* exist. Renaming to "abcx" or "testxx" etc does the same..."abcx"
exists, "textxx" does not.

Renaming it back and forth from explorer reproduces the same results.

File system rights don't seem to be the issue.

Strangely, readdir does see the directory such as:
$handle=opendir("D:\Program Files\Apache
Group\Apache\htdocs\Utils\Old_Ocean_Backup");
while ($file = readdir($handle)) {
...}

Installed a fresh version of PHP and Apache today after first running
into problem (was on apache 2.0 and PHP 4.3 from last week): 
PHP 4.3.10RC2-dev.
Apache 1.3
Windows NT 5.0 build 2195 (Windows 2000)

Reproduce code:
---------------
See description

Expected result:
----------------
Expected the code to treat the existance of a directory the same
regardless of its name.

Actual result:
--------------
Code treats the existance of a directory different based on directory
name.



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=30981&edit=1

Reply via email to