|cache:clear and "Permission denied" on Windows7||M. Althaus||6/7/12 8:12 AM|
I encountered a strange behavuour with cache:clear after starting a new project some days ago. I've started from scratch with the 2.0.15 no-vendor edition, installed the vendors, set basic config etc.
The issue now is: Whenever I try to do a cache:clear with an existing cache directory, it fails on me cause I cannot rename "env_new" to "env":
Warning: rename(D:/foobar/app/cache/dev_new,D:/foobar/app/cache/dev): Permission denied (code: 5) in D:\foobar\vendor\symfony\src\Symfony\Bundle\FrameworkBundle\Command\CacheClearCommand.php line 74
After digging around I found this comment from Feb 2011 in the PHP manual:
When I add the workaround to CacheClearCommand->execute() at line 75 like this
The problem vanished and the script executes fine. I know... it's Windows... and to make it even stranger: The command works flawlessly in my old project (on 2.0.11). o_O
I tried everything to setup the new project... cache:clear fails all the time without that workaround.
Did anybody encounter this weird issue?
|Re: cache:clear and "Permission denied" on Windows7||Jin Lu||6/28/12 9:43 AM|
I had exactly problem with you, this bug took me days already, first I thought it was because wrong access permission of the cache directory, but it was rightly configured. I was driving crazy before your post, your solution works but I have to set the sleep time a little bit longer on my system.
在 2012年6月7日星期四UTC+2下午5时12分17秒，M. Althaus写道：
|Re: cache:clear and "Permission denied" on Windows7||Kifah||7/2/12 4:03 AM|
I recommend you to prepare a virtual machine, ubuntu based for example, and doo your console commands on it.
it will solve more problems than you can imagine.
you can still have your windows 7 on top of that, with your favorite IDE.
have a look at http://www.vagrantup.com
Am Donnerstag, 7. Juni 2012 17:12:17 UTC+2 schrieb M. Althaus:
|Re: [Symfony2] Re: cache:clear and "Permission denied" on Windows7||M. Althaus||7/5/12 12:44 AM|
Thanks, but my customer has a Windows machine.
2012/7/2 Kifah <kifah...@devbliss.com>
|Re: [Symfony2] Re: cache:clear and "Permission denied" on Windows7||fc1982||8/21/12 8:21 AM|
I have the same problem on Win 7, have you found a solution?
El jueves, 5 de julio de 2012 04:44:50 UTC-3, M. Althaus escribió:
|Re: cache:clear and "Permission denied" on Windows7||Collin Lavoie||10/22/12 1:55 PM|
I had a similar problem, but in my case the error was related to renaming to dev_old (no-warmup):
Warning: rename(C:/wamp/www/my-project/app/cache/dev,C:/wamp/www/my-project/app/cache/dev_old): Access is denied. (code: 5)
in C:\wamp\www\my-project\vendor\symfony\symfony\src\Symfony\Bundle\FrameworkBundle\Command\CacheClearCommand.php line 71
I found that the "dev_old" folder already existed and that the problem was resolved by simply deleting it.
Le jeudi 7 juin 2012 11:12:17 UTC-4, M. Althaus a écrit :
|AW: [Symfony2] Re: cache:clear and "Permission denied" on Windows7||Matthias Althaus||10/23/12 12:56 AM|
Yeah... it breaks if an _old folder exists, but I can reproduce my error locally with a clean cache directory.
Am 23.10.2012 08:26 schrieb Collin Lavoie <col...@secureops.com>:
|Re: cache:clear and "Permission denied" on Windows7||Caponica||8/15/13 4:22 AM|
I still experience this problem with Sf2.3 - is there any appetite in the Sf core team to implement this sleep(1) workaround?