php.net |  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.
Password:
Status:
Package:
Bug Type:
Summary:
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);
  if($dp){
    while (($file = readdir($dp))!== false) {
      // Skip . and .. and check for type
      // tried with this on and both here and at the start
      clearstatcache();
      print($file." - ".filetype($file)."\n");
     
      if(($file != ".") && ($file != "..") && (filetype($file) == $type)){
	$files[] = $file;
      }
    }//while
    return($files);
  }//if
  else{
    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");
    return(0);
  }
-- end of snippet ---------------------------------

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-01-12 10:30 UTC] cynic@php.net
a user error
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 04:01:28 2024 UTC