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

Pull Requests

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: Sun Dec 08 15:01:28 2024 UTC