Bug #53601 [Opn->Fbk]: function rename

From: Date: Fri, 24 Dec 2010 04:42:25 +0000
Subject: Bug #53601 [Opn->Fbk]: function rename
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-157295@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=53601&edit=1

 ID:                 53601
 Updated by:         aharvey@php.net
 Reported by:        tom_84 at hotmail dot it
 Summary:            function rename
-Status:             Open
+Status:             Feedback
 Type:               Bug
-Package:            Unknown/Other Function
+Package:            Filesystem function related
 Operating System:   debian lenny
 PHP Version:        5.2.16
 Block user comment: N
 Private report:     N

 New Comment:

Why are you expecting rename() to fail in this case?

Even if $file was open when rename() was called (and it's not, in this
case), that doesn't prevent a file being renamed on most operating
systems, Linux included.


Previous Comments:
------------------------------------------------------------------------
[2010-12-24 00:32:36] tom_84 at hotmail dot it

Description:
------------
---
From manual page: http://www.php.net/function.rename
---
This function should return false on error during file renomination, but
in my test script inclusion is executed but renomination it's not
executed (no output, expected output:0).

Test script:
---------------
$file = getcwd()."/test.php";
$file2 = $file.".inc";

if (file_exists($file))
{  include $file;
   echo rename($file,$file2);
}



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



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


Thread (4 messages)

« previous php.bugs (#157295) next »