php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45447 filesystem time functions
Submitted: 2008-07-07 19:10 UTC Modified: 2009-08-17 08:43 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: Bryan dot Gallant at hma dot com Assigned: pajoye
Status: Closed Package: Filesystem function related
PHP Version: 5.2.6 OS: Windows Server 2008
Private report: No CVE-ID:
 [2008-07-07 19:10 UTC] Bryan dot Gallant at hma dot com
Description:
------------
All Time related Statistics for Files return "-1".

W2K8/IIS7

Reproduce code:
---------------
print_r(stat($file));

Expected result:
----------------
Unix timestamp on atime,mtime,ctime

Actual result:
--------------
Array ( [0] => 0 
        [1] => 0 
        [2] => 33188 
        [3] => 1 
        [4] => 0 
        [5] => 0 
        [6] => -1 
        [7] => 0 
        [8] => -1 
        [9] => -1 
        [10] => -1 
        [11] => -1 
        [12] => -1 
        [dev] => 0 
        [ino] => 0 
        [mode] => 33188 
        [nlink] => 1 
        [uid] => 0 
        [gid] => 0 
        [rdev] => -1 
        [size] => 0 
        [atime] => -1 
        [mtime] => -1 
        [ctime] => -1 
        [blksize] => -1 
        [blocks] => -1 )

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-07-07 21:50 UTC] jani@php.net
And $file is..?
 [2008-07-07 23:57 UTC] Bryan dot Gallant at hma dot com
So far I've tried all manner of office documents, tifs, jpegs, text files, etc.
 [2008-07-08 00:12 UTC] Bryan dot Gallant at hma dot com
Sorry, it's the full path in a string.
 [2008-08-04 21:13 UTC] Bryan dot Gallant at hma dot com
Interesting Update.  using the same code on an old Win2k Box against the files on the 2008 server, it works as intended.
 [2008-08-13 06:55 UTC] jani@php.net
What filesystem is used in the one that fails and on the one where it doesn't fail..?
 [2008-08-13 07:46 UTC] pajoye@php.net
http://phpfi.com/342491 should fix it.

I'm working on fixing many filesystem functions on Windows (touch, filemtime, stat, etc.).  98% of the file tests pass now on 2k8, xp and vista.
 [2008-08-15 18:36 UTC] pajoye@php.net
Fixed in CVS. Please try the 5.3 snapshot from http://snaps.php.net (the zip, not the MSI).
 [2008-08-23 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2009-08-17 08:43 UTC] pajoye@php.net
Fixed in 5.3+
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Sat Apr 19 06:02:27 2014 UTC