contao/import — Issue #3593: rename() doesn't work properly on Windows in PHP < 5.2.5
Author: Toflar
Created: 2011-11-29 21:51:48+00:00
State: open
Labels: Defect, framework

Hi Leo

A user seems to have problems with the FileCache on a Windows system: http://www.contao-community.de/showthread.php?24472-Version-2.10.2-Fehler

I did some research and apparently, you cannot use rename() on existing files with Windows systems.
For more details also see the comments on php.net: http://php.net/manual/de/function.rename.php

There are some workarounds posted, i.e.: http://www.php.net/manual/de/function.rename.php#56576

I did some further research and found that it has been fixed in PHP 5.2.5: https://bugs.php.net/bug.php?id=44805
**sigh**

I think we will need a wrapper function in functions.php to work around this problem. Maybe anyone has a working script or you find something better. Will keep you posted, if I find something that looks smart enough.

Related issues: #3390

--- _Originally created on October 31st, 2011, at 10:32pm (ID 3593)_