php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8088 is_file() not working properly
Submitted: 2000-12-03 14:29 UTC Modified: 2000-12-07 13:16 UTC
From: claus-bernth at sports-mc dot dk Assigned:
Status: Closed Package: Filesystem function related
PHP Version: 4.0.3pl1 OS: win95
Private report: No CVE-ID: None
 [2000-12-03 14:29 UTC] claus-bernth at sports-mc dot dk
Description script:
<?
  $image = 'gfx/test.jpg';  // existing file
  if (is_file($image))   {  // check file, returns true...
    echo $res;              // '1' is printed...
  }
  
  $image = 'gfx/test.jp';   // non-existing file
  if (is_file($image))   {  // check file => PHP error
    echo $res;              // now PHP prints:
  }
?>

"Stat failed in line 8 in module <modulename>..."
----
Compilation: Standard win32 installation file!
PHP.ini file nonstandard settings:
safe_mode=on

end of bug report,
Claus Bernth

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-12-03 14:49 UTC] claus-bernth at sports-mc dot dk
After shutting down apache, installing PHP3, running the script (without error), php4 was reinstalled; rerunning the script now did not reproduce the error... 

Will fill in more information if I get any!
 [2000-12-07 13:16 UTC] dbeu@php.net
unable to reproduce
 [2004-07-23 12:41 UTC] akk at yakk dot org
is_file is returning true for directories..
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Oct 30 22:01:28 2024 UTC