Edit report at https://bugs.php.net/bug.php?id=48771&edit=1
ID: 48771 Updated by: paj...@php.net Reported by: bugs at thundercall dot dk Summary: rename() between drives error: No error Status: Closed Type: Bug Package: Filesystem function related Operating System: win32 only - Windows XP PHP Version: 5.3CVS-2009-07-02 (snap) Assigned To: pajoye Block user comment: N Private report: N New Comment: @luizael dot batista at gmail dot com Please print out the content of: dirname(__FILE__)."/modulos/".$name and paste it here. Whether you use variables or not is not relevant but what is in the variables. Previous Comments: ------------------------------------------------------------------------ [2012-08-02 19:25:16] luizael dot batista at gmail dot com hello, when using the rename so -->rename(dirname(__FILE__)."/modulos/oldfolder",dirname(__FILE__)."/modulos/newfolder"); works correctly , when I add a variable triggers an alert stating that the volume syntax is incorrect : rename(dirname(__FILE__)."/modulos/oldfolder",dirname(__FILE__)."/modulos/".$name); how do I fix this? ------------------------------------------------------------------------ [2011-06-12 15:32:17] paj...@php.net @tijs_maas at hotmail dot com Please use a simple: rename($path1, $path2); as reproduce script, nothing else. That's all this bug is about :) ------------------------------------------------------------------------ [2011-06-12 15:27:05] tijs_maas at hotmail dot com I don't know if i am right but i think i also notice this bug. I do not even use absolute paths. I could use this function wrong or it is the bug, it sais: No error on line 19 $pathtothisfolder = explode("/", str_replace(array('//', '\\'),'/',dirname(__FILE__))); $pathtoUpperParent = ""; for( $i = 0; $i < count($pathtothisfolder) - 2; $i++ ) { $pathtoUpperParent .= $pathtothisfolder[$i]."/"; } $rootname = trim($pathtoUpperParent, versieDirPath()); $parents = count(explode("/", $rootname)) + 2; $parentpath = ""; while ($parents > 0 ) { $parentpath .= "../"; $parents --; } // voer de rename operatie uit rename($parentpath.$_GET['versie']."/", $parentpath."sdfsdf/" ); The paths i use are without drives, am I also affected by this bug? ------------------------------------------------------------------------ [2010-09-06 13:00:51] ahar...@php.net Automatic comment from SVN on behalf of aharvey Revision: http://svn.php.net/viewvc/?view=revision&revision=303070 Log: Per Pierre's e-mail, add a note that the fix for bug #48771 made cross-drive renames work in Windows. ------------------------------------------------------------------------ [2009-07-06 09:09:33] paj...@php.net This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=48771 -- Edit this bug report at https://bugs.php.net/bug.php?id=48771&edit=1