|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9208 rename() not using current working directory
Submitted: 2001-02-10 17:04 UTC Modified: 2001-11-19 06:39 UTC
From: lalik at softhome dot net Assigned:
Status: Closed Package: Filesystem function related
PHP Version: 4.0.4pl1 OS: windows 98
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: lalik at softhome dot net
New email:
PHP Version: OS:


 [2001-02-10 17:04 UTC] lalik at softhome dot net
rename() function does not use current working directory, but c:\php\ instead (on windows system)

so if I use rename('a','b') from any directory, it will try to rename c:\php\a to c:\php\b


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-10-29 02:26 UTC]
Does this fail with PHP 4.0.6 too?

 [2001-11-19 05:42 UTC]
No feedback. Closing.
 [2001-11-19 06:39 UTC]
This is <most probably> because you are calling php from the command line in the following format:

php -q c:\php_scripts\script.php

which would make c:\php4\ your working directory rather than c:\php_scripts\, to correct this chdir() before you execute php and call it like c:\php4\php -q script.php or chdir() at the begining of your script.

- James
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jul 20 09:01:29 2024 UTC