Edit report at http://bugs.php.net/bug.php?id=53601&edit=1
ID: 53601 Updated by: ahar...@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