|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8674 invallid filetype() results (affects isdir() )
Submitted: 2001-01-12 09:58 UTC Modified: 2001-01-12 10:30 UTC
From: yavo at itena dot com dot cy Assigned:
Status: Closed Package: Filesystem function related
PHP Version: 4.0.4 OS: redhat 6.2
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: yavo at itena dot com dot cy
New email:
PHP Version: OS:


 [2001-01-12 09:58 UTC] yavo at itena dot com dot cy
im using php for shell scripting in redhat 6.2. compiled with 
'./configure' '--with-apxs=/usr/local/apache/bin/apxs' '--with-oci8=/usr/local/oracle'

trying to get the filetype files returns null for all entries exsept . and .. . 

-- code snippet -- 
  $dp = opendir($dir);
    while (($file = readdir($dp))!== false) {
      // Skip . and .. and check for type
      // tried with this on and both here and at the start
      print($file." - ".filetype($file)."\n");
      if(($file != ".") && ($file != "..") && (filetype($file) == $type)){
	$files[] = $file;
    debug("The directory [$dir] was not found or couldn't be opened");
    write_log("The directory [$dir] was not found or couldn't be opened");
-- end of snippet ---------------------------------


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-01-12 10:30 UTC]
a user error
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Wed Jun 07 15:03:42 2023 UTC