ID:               35980
 Updated by:       [EMAIL PROTECTED]
 Reported By:      pavel dot hlousek at gmail dot com
 Status:           Assigned
 Bug Type:         *Directory/Filesystem functions
 Operating System: windows only
 PHP Version:      *
 Assigned To:      pollita
 New Comment:

I'll try looking for unencumbered information to develop a fix that
avoids GPL licensing complications first.

If it's indeed the result of a bug in the microsoft OS implementation
there should be sufficient information out there to develop a fix that
doesn't involve reusing restrictively licensed code.


Previous Comments:
------------------------------------------------------------------------

[2006-04-15 21:16:05] [EMAIL PROTECTED]

Sara, could you plz check the patch out? Thanks.

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

[2006-01-15 18:30:26] [EMAIL PROTECTED]

Patch: http://mega.ist.utl.pt/~ncpl/php_win_touch_dirs.txt

Note: it includes a function that was adapted from Perl 5
(win_filetime_from_time). The Perl code is distributed under GPL (and
that file is (c) 1995 Microsoft Corporation), so I'm not sure if the
code can go in. That function just converts a time_t into microsoft's
format.

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

[2006-01-15 00:15:30] [EMAIL PROTECTED]

This is a bug in microsoft's utime implementation.
However, Perl is able to workaround this bug with SetFileTime(). I'll
see if I can cook a nice patch.

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

[2006-01-14 10:58:44] [EMAIL PROTECTED]

"Permission denied" means that the user which the script was run as
does not have permissions to do it. It's not a PHP bug.

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

[2006-01-12 16:17:05] pavel dot hlousek at gmail dot com

Description:
------------
<?php touch('non-existing-file'); ?> - Correct. Creates a new file.

<?php touch('existing-file'); ?> - Correct. Changes file's mtime.

<?php touch('existing-directory'); ?> - Wrong on Win2K. Does not change
directory's mtime. Correct on Linux. I did not test any other Win32
platforms. Filesystem: NTFS. The user running the script owns
'existing-directory'. safe_mode=Off.

Reproduce code:
---------------
<?php touch('existing-directory'); ?>

Expected result:
----------------
Change mtime of an existing directory.

Actual result:
--------------
Utime failed: Permission denied in <fullpath/to/existing-directory> on
line 1


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


-- 
Edit this bug report at http://bugs.php.net/?id=35980&edit=1

Reply via email to