ID:               30089
 Updated by:       [EMAIL PROTECTED]
 Reported By:      jeppe at bundsgaard dot net
-Status:           Feedback
+Status:           No Feedback
 Bug Type:         Filesystem function related
 Operating System: FreeBSD 5.2.1-RC
 PHP Version:      4.3.8
 New Comment:

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".


Previous Comments:
------------------------------------------------------------------------

[2004-10-01 21:05:42] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

I can not reproduce this with latest CVS snapshot using CLI.
Please try with the CLI binary. And if it works, do tell us what
webserver you might be using..


------------------------------------------------------------------------

[2004-09-15 00:25:09] jeppe at bundsgaard dot net

Description:
------------
When renaming a directory, say ../mydir to ../del/mydir, it seems that
php forget the current dir - sets it to nothing. I can resolve the
problem by getting the current dir (getcwd) before the rename and
setting it after (chdir).

It seems that the problem exists when renaming from a dir that is one
level smaller than the rename-to dir - so when renaming from
../mydir/subdir to ../del/subdir - everything is ok. 

I admit: This sounds strange. So it took me some time to locate the
problem.

And yes: I am sure that ../del exists - this script has been working
without problems on a lot of versions of php, a lot of webhotels and a
lot of different setups.

Reproduce code:
---------------
mkdir("../mydir",0777);
mkdir("../del",0777);
echo "First: ".getcwd();
rename("../mydir","../del/mydir");
echo "<br>And second: ".getcwd();

Expected result:
----------------
First: /usr/home/web/web33953/kursus/admin
And second: /usr/home/web/web33953/kursus/admin

Actual result:
--------------
First: /usr/home/web/web33953/kursus/admin
And second: 


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=30089&edit=1

Reply via email to