#11984 [Opn->Fbk]: filetype function not working for non-existant files

From: Date: Mon, 09 Sep 2002 10:26:31 +0000
Subject: #11984 [Opn->Fbk]: filetype function not working for non-existant files
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-18742@lists.php.net to get a copy of this message
ID: 11984 Updated by: sniper@php.net Reported By: JSaunders@edis.co.uk -Status: Open +Status: Feedback Bug Type: Filesystem function related Operating System: Windows 98 PHP Version: 4.2.2 New Comment: Please try with PHP 4.2.3. Previous Comments: ------------------------------------------------------------------------ [2002-08-15 03:42:50] JSaunders@edis.co.uk Downloaded 200208150600.zip snap build, the problem still exists in this, but I can't reproduce it on Solaris (under 4.0.6). So suggests different handling of stat returns under win32/Solaris (filestat.c - php_stat). Hope to look @ code and do static walkthrough as I don't have Windows compiler to hand. ------------------------------------------------------------------------ [2002-08-14 09:43:38] kalowsky@php.net Updating verison. yes it's good to test bugs, but also please realize a lot of changes have occured including between 4.2.2 and the current CVS. It wasn't a case of N months, it's more a case of version fixes. And I do believe we just fixed this in CVS last week... can you try out a non-STABLE snapshot and see? ------------------------------------------------------------------------ [2002-08-14 05:35:55] JSaunders@edis.co.uk Tested this on 4.2.2 bug is still there. Would have fixed it myself but there was masses of change in the code that handles filetype between 4.0.5 and 4.0.6. Better to look at the problem than arbitarily close entries more than n months old. The example isn't rocket science to retest. Remember 4.0.6 was the current release when I raised the bug! Thanks ------------------------------------------------------------------------ [2002-08-13 23:54:09] iliaa@php.net Thank you for taking the time to report a problem with PHP. Unfortunately you are not using a current version of PHP -- the problem might already be fixed. Please download a new PHP version from http://www.php.net/downloads.php If you are able to reproduce the bug with one of the latest versions of PHP, please change the PHP version on this bug report to the version you tested and change the status back to "Open". Again, thank you for your continued support of PHP. ------------------------------------------------------------------------ [2001-07-09 13:12:08] JSaunders@edis.co.uk Regression error from 4.0.5 to 4.0.6. Looks like using filetype on a non-existant file, returns the value of the last valid call. Seen on the pre-compiled win32 flavour download with all modules. <?php echo filetype("c:/zzzzzz.zzz"); echo filetype("c:/"); echo filetype("c:/zzzzzz.zzz"); ?> Produces <br> <b>Warning</b>: Unknown file type (0) in <b>-</b> on line <b>2</b><br> unknowndirdir on 4.0.6. The file zzzzzzz.zzz does not exist. 4.0.5 returns dir with no warning. clearstatcache() has no effect. Have to explicitly check for file existance with file_exists under this release. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=11984&edit=1

« previous php.bugs (#18742) next »