php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9993 Wrong File Created Date and Wrong Filesize
Submitted: 2001-03-26 08:40 UTC Modified: 2001-06-14 16:09 UTC
From: lopes at noite dot pt Assigned:
Status: Closed Package: *Directory/Filesystem functions
PHP Version: 4.0.4 OS: WINNT
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: lopes at noite dot pt
New email:
PHP Version: OS:

 

 [2001-03-26 08:40 UTC] lopes at noite dot pt
I have already send a previus bug report.
ID: 9921.

The Source is :

<?php 
   $fhandle = opendir("."); 

   while (false!=($file = readdir($fhandle))) 
   { 
      if ($file != "." && $file != "..") 
      { 
if (!(is_dir($file))) 
{ 
      $fdata = filemtime($file); 
      $fdata = date("d/m/Y",$fdata); 
      $fsize = filesize($file); 
     
              printf("%s %s %dn", $file, $fdata, $fsize); 

} 

clearstatcache(); 
closedir($fhandle); 
      } 
   } 
?> 


The Output for every file (no matter filesize or file date) is :


<filename> 01/01/1970 0


---------------------

I think i has something to do with the Y2K bug.
Perl had the same bug.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-14 16:09 UTC] sniper@php.net
Must be fixed since I can't reproduce this with 4.0.5.
(or it's your system)

 [2002-07-04 07:47 UTC] oliveirb dot mallet at edf dot fr
I have the same problem with filemtime (always returns 0), with PHP4.0.6 on Solaris 5.6

The bug must be reopen.

Olivier
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 27 17:01:30 2024 UTC