php.net |  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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
46 + 36 = ?
Subscribe to this entry?

 
 [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!

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-11-30 04:08 UTC] dbeu@php.net
this is already fixed, wait for 4.0.4 or get a dev version i.e. from php4win.de
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 09:01:26 2024 UTC