|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-12-05 03:57 UTC] andy dot thoreson at verizon dot net
[2004-12-06 08:27 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 12:00:02 2025 UTC |
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.