php.net |  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:
MUST BE VALID
Solve the problem:
11 - 2 = ?
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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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


 [2001-11-19 05:42 UTC] sander@php.net
No feedback. Closing.
 [2001-11-19 06:39 UTC] jmoore@php.net
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-2023 The PHP Group
All rights reserved.
Last updated: Fri Jun 09 19:03:38 2023 UTC