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

Patches

Pull Requests

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-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 11:01:30 2024 UTC