I have installed Symfony 2.0.7 on Ubuntu 11.10. I have this problem:
I changed the permissions of the cache e logs directories using the following commands:
chmod 777 -R cache
chmod 777 -R logs
and all functions as I was expecting.
Then I made:
app/console cache:clear
Clearing the cache for the dev environment with debug true
permissions of cache/dev change to 755 and symfony cannot write in that:
RuntimeException: Failed to write cache file "/var/www/myapp/app/cache/dev/classes.php".
in /var/www/myapp/app/bootstrap.php.cache line 1079 at ClassCollectionLoader::writeCacheFile() in /var/www/myapp/app/bootstrap.php.cache line 1017 at ClassCollectionLoader::load() in /var/www/myapp/app/bootstrap.php.cache line 682 at Kernel->loadClassCache() in /var/www/myapp/web/app_dev.php line 23
How can I solve this apparent bug in Symfony 2?
--no-warmupwhen clearing the cache so thedevfolder won't be created by the CLI user. Then, first time you request a page within your browser, thedevfolder is created by thewww-datauser. I ended using the solution posted by Federico Gallo, below. - VMC