#46629 [NEW]: is_dir returns incorrect result
From: j-e dot zwar at bigpond dot net dot au
Operating system: Windows XP PRO SP3
PHP version: 5.2.6
PHP Bug Type: Directory function related
Bug description: is_dir returns incorrect result
Description:
------------
PHP function is_dir does not recognise some of the directories in my PC
directory structure.
Environment is:
. Dell Core 2 Duo PC
. Windows XP Pro SP3
. PHP version 5.2.6
. IIS version 5.1
. MySQL version 5.0.51b-community-nt
. Dreamweaver MX2004 version 7 as the "text editor"
. Internet Explorer version 6.0.2900
. sendmail.exe
All running on the Dell PC - i.e., all executions are via 'localhost'
Reproduce code:
---------------
$dir1 = "C:/AAImages/";
$dir2 = "C:/Documents and Settings/";
$dir3 = "C:/Documents and Settings/Fred & Ginger/";
$dir4 = "C:/Documents and Settings/Fred & Ginger/My Documents/";
$dir5 = "C:/Documents and Settings/Fred & Ginger/My Documents/AC Images
Test/";
var_dump (is_dir($dir1)); // returns true (correctly)
var_dump (is_dir($dir2)); // returns true (correctly)
var_dump (is_dir($dir3)); // returns true (correctly)
var_dump (is_dir($dir4)); // returns false (incorrectly)
var_dump (is_dir($dir5)); // returns false (incorrectly)
But all these directories do exist on my PC and I have checked the
spelling carefully. Permissions seem to be OK as I can upload files from
the lower level directories via an HTML form OK.
Expected result:
----------------
var_dump (is_dir($dir4)) and var_dump(is_dir($dir5)) should both return
TRUE, i.e., all of the 5 var_dumps should return TRUE.
Have tried it inversely and the same error is apparent - i.e., tried
var_dump(!is_dir($dir4)) etc. With the 'not' tests I get false, false,
false, true and true.
Have also tried it with double backslashes in the directory names instead
of the single forward slashes - same error apparent.
Have also tried it without the trailing forward slash at the end of each
directory name with the same erroneous result.
Actual result:
--------------
var_dump (is_dir($dir1)); // returns true (correctly)
var_dump (is_dir($dir2)); // returns true (correctly)
var_dump (is_dir($dir3)); // returns true (correctly)
var_dump (is_dir($dir4)); // returns false (incorrectly)
var_dump (is_dir($dir5)); // returns false (incorrectly)
Any help/advice will be very much appreciated.
Thank you in anticipation.
--
Edit bug report at http://bugs.php.net/?id=46629&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46629&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46629&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46629&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=46629&r=fixedcvs
Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=46629&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=46629&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=46629&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=46629&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=46629&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=46629&r=support
Expected behavior: http://bugs.php.net/fix.php?id=46629&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=46629&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=46629&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=46629&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46629&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=46629&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=46629&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=46629&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=46629&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=46629&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=46629&r=mysqlcfg
Thread (12 messages)
- j-e dot zwar at bigpond dot net dot au
- jani@php.net#46629 [Opn->Fbk]: is_dir returns incorrect result
- j-e dot zwar at bigpond dot net dot au#46629 [Fbk->Opn]: is_dir returns incorrect result
- jani@php.net#46629 [Opn->Fbk]: is_dir returns incorrect result
- j-e dot zwar at bigpond dot net dot au#46629 [Fbk->Opn]: is_dir returns incorrect result
- pajoye@php.net#46629 [Opn->Fbk]: is_dir returns incorrect result
- j-e dot zwar at bigpond dot net dot au#46629 [Fbk->Opn]: is_dir returns incorrect result
- j-e dot zwar at bigpond dot net dot au#46629 [Opn]: is_dir returns incorrect result
- j-e dot zwar at bigpond dot net dot au#46629 [Opn]: is_dir returns incorrect result
- felipe@php.net#46629 [Opn->Bgs]: is_dir returns incorrect result
- j-e dot zwar at bigpond dot net dot au#46629 [Bgs]: is_dir returns incorrect result
- pajoye@php.net#46629 [Bgs]: is_dir returns incorrect result