php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16835 Touch function can't modify the date/time of a file
Submitted: 2002-04-25 18:02 UTC Modified: 2002-05-10 15:49 UTC
Votes:2
Avg. Score:4.5 ± 0.5
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:0 (0.0%)
From: v dot marco at libero dot it Assigned:
Status: Closed Package: Filesystem function related
PHP Version: 4.2.0 OS: Windows
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: v dot marco at libero dot it
New email:
PHP Version: OS:

 

 [2002-04-25 18:02 UTC] v dot marco at libero dot it
Touch function can't modify the date/time of a file.

When try to call that function PHP always reply with:

Warning: utime failed: Invalid argument in d:\....


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-05-05 01:57 UTC] e9626334 at stud3 dot tuwien dot ac dot at
I believe this may be a symptom of the same bug: on FreeBSD 4.5-RELEASE (x86), PHP 4.2.0's touch() function, at least when being called without the optional time argument, sets a wrong date on touched files. In my case, it's April 23, 1991(!). My system date _is_ correct; and touch(1) does work fine. 

This problem is 100% reproducible and did not exist in PHP 4.1.2 or any previous 4.x releases.
 [2002-05-05 03:19 UTC] derick@php.net
This should be fixed, can you try a windows snapshot (stable branch) from snaps.php.net/win32 ?

Derick
 [2002-05-10 15:49 UTC] derick@php.net
Fixed
 [2002-09-16 11:02 UTC] donald at design dot za dot net
I am still getting the problem in version 4.2.3
touch() will not update my file time..

<?php
$f = "./test";
touch($f);
echo filectime($f)."<br>";
?>

always returns the same value in windows, but on a unix platform the time does change.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 27 03:01:28 2024 UTC