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

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-2025 The PHP Group
All rights reserved.
Last updated: Wed Jan 08 11:01:30 2025 UTC