ID: 39198 User updated by: php dot spam at frogblender dot net Reported By: php dot spam at frogblender dot net -Status: Bogus +Status: Open Bug Type: Directory function related Operating System: Windows 2003 -PHP Version: 5.1.4 +PHP Version: 5.1.6 New Comment:
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. Previous Comments: ------------------------------------------------------------------------ [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