ID:               39198
 Updated by:       [EMAIL PROTECTED]
 Reported By:      php dot spam at frogblender dot net
-Status:           Open
+Status:           Feedback
 Bug Type:         Directory function related
 Operating System: Windows 2003
 PHP Version:      5.1.6
 New Comment:

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.




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

[2006-10-23 12:27:01] php dot spam at frogblender dot net

There's nothing wrong with our server, thank you.

I happened to remember an old Windows 2000 server I could test this on.
The bug was reproducible with PHP 5.0 and 5.2 RC6, no surprise there.
Was using IIS with default user, php5isapi.dll, unmodified php.ini

Tony2001, perhaps you shouldn't be managing bugs related to Windows if
you don't have the equipment to verify them.

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

[2006-10-19 16:09:35] [EMAIL PROTECTED]

Sorry, we can't go back to the past and fix it on your server.

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

[2006-10-19 15:38:54] php dot spam at frogblender dot net

Sorry, but I don't care whether this bug will be fixed or not.

The server is not mine to mess with so I can't install another PHP
version.

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

[2006-10-19 14:04:55] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip



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

[2006-10-19 14:00:37] php dot spam at frogblender dot net

Description:
------------
If you have a directory where Everyone has "Full Control" rights you
would expect is_dir to return true but it doesn't.

This bug has existed since 5.0.0 and I've had this problem on at least
three servers during the past year.

I'm lying about my PHP version (it's really 5.1.4) but I've checked the
change log.

realpath() seem to exhibit the proper behavior.

Reproduce code:
---------------
<?php
print("<pre>");
error_reporting(E_ALL);
#clearstatcache();

$paths = array(
        "C:\\",
        "C:\\Windows",
        "C:\\Windows\\Temp",
        "C:\\Windows\\Temp\\RP_Compile",
        "C:\\Windows\\Temp\\DoesNotExist",
        "C:\\Windows\\Temp\\RP_Compile\\Subdir",
);

print("\nis_dir()\n");
foreach($paths as $path)
        print(is_dir($path) . " \t$path\n");

print("\nrealpath()\n");
foreach($paths as $path)
        print(!(realpath($path) === FALSE) . " \t$path\n");

print("\nstat()\n");
foreach($paths as $path)
        print(!(stat($path) === FALSE) . " \t$path\n");

print("</pre>");
?>


Expected result:
----------------
is_dir()
1       C:\
1       C:\Windows
1       C:\Windows\Temp
1       C:\Windows\Temp\RP_Compile
        C:\Windows\Temp\DoesNotExist
1       C:\Windows\Temp\RP_Compile\Subdir

realpath()
1       C:\
1       C:\Windows
1       C:\Windows\Temp
1       C:\Windows\Temp\RP_Compile
        C:\Windows\Temp\DoesNotExist
1       C:\Windows\Temp\RP_Compile\Subdir


Actual result:
--------------
Notice the different result for "C:\Windows\Temp\RP_Compile"

is_dir()
1       C:\
1       C:\Windows
1       C:\Windows\Temp
        C:\Windows\Temp\RP_Compile
        C:\Windows\Temp\DoesNotExist
1       C:\Windows\Temp\RP_Compile\Subdir

realpath()
1       C:\
1       C:\Windows
1       C:\Windows\Temp
1       C:\Windows\Temp\RP_Compile
        C:\Windows\Temp\DoesNotExist
1       C:\Windows\Temp\RP_Compile\Subdir



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


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

Reply via email to