php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #29812 rename() don't overwrite existing files at windows (as at linux)
Submitted: 2004-08-24 12:36 UTC Modified: 2013-12-07 22:49 UTC
Votes:18
Avg. Score:4.3 ± 1.0
Reproduced:17 of 17 (100.0%)
Same Version:3 (17.6%)
Same OS:12 (70.6%)
From: melker at kuh dot at Assigned:
Status: Duplicate Package: *General Issues
PHP Version: 4.3.8 OS: winxp
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: melker at kuh dot at
New email:
PHP Version: OS:

 

 [2004-08-24 12:36 UTC] melker at kuh dot at
Description:
------------
Hi,

rename ( 'file1', 'file2' ); 

behaviour at linux:

If there is a 'file2', the file2 will be overwritten by file1.

at windows xp:
If there is a 'file2', a warning is given and the file2 isn't overwritten with file1.

Reproduce code:
---------------
rename ( 'file1', 'file2' ); 



Expected result:
----------------
I would expect, that rename() works with the same behaviour at all operating systems.

So, please overwrite existing files or give a warning at all os.

Actual result:
--------------
rename()
at linux, existing files will be overwritten, at winxp, the rename-process fails, a php-warning is given.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-03-05 11:16 UTC] tom at r dot je
This isn't restricted to Windows XP but also affects other versions. I've tested Windows Vista and Windows Server 2008, both have this same problem.
 [2013-12-07 14:08 UTC] cmbecker69 at gmx dot de
This request is a related to bug report #41985[1].

The issue is solved since PHP 5.3.

[1] <https://bugs.php.net/bug.php?id=41985>
 [2013-12-07 22:49 UTC] aharvey@php.net
-Status: Open +Status: Duplicate -Package: Feature/Change Request +Package: *General Issues
 [2013-12-07 22:49 UTC] aharvey@php.net
Good catch. Closing as duplicate of bug #41985.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 11:01:30 2024 UTC