|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8044 rename() with relative paths - wrong behaviour
Submitted: 2000-11-30 02:56 UTC Modified: 2000-11-30 04:08 UTC
From: christian at wenz dot org Assigned:
Status: Closed Package: Filesystem function related
PHP Version: 4.0.3pl1 OS: Win32
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: christian at wenz dot org
New email:
PHP Version: OS:


 [2000-11-30 02:56 UTC] christian at wenz dot org
create a file c:\temp\temp.txt
Now create a PHP file, but not in the root directory of your webserver, but in a subdirectory of it, that contains this command:

rename("c:\\temp\\temp.txt", "temp.txt");

Now run this script from your webbrowser (e.g. http://server/subdir/rename.php)

The file is now moved away from c:\temp, but not into the directory where rename.php resides in (as one would guess), but in the root directory of the web application!


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2000-11-30 04:08 UTC]
this is already fixed, wait for 4.0.4 or get a dev version i.e. from
PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC