|  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
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:
Solve the problem:
32 + 40 = ?
Subscribe to this entry?

 [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: Wed Jun 19 02:01:29 2024 UTC