ConsoleBundle: Cache:clear doesn't work

I’m having issues executing the cache:clear command with this bundle.

On my server :

Clearing the cache for the prod environment with debug true

  [Symfony\Component\Filesystem\Exception\IOException]                                                  
  Failed to remove directory /var/www/sites/my-website/app/cache/prod_old/sessions

Is it about webserver’s user rights ?

In local :

[error] Internal Server Error

And here is what I find in the logs for the local error :

[2013-08-21 11:51:53] request.CRITICAL: Exception thrown when handling an exception (Symfony\Component\Debug\Exception\ContextErrorException: Warning: file_put_contents(/var/www/sites/my-website/app/cache/dev/annotations/Symfony-Bundle-TwigBundle-Controller-ExceptionController.cache.php): failed to open stream: No such file or directory in /var/www/sites/my-website/vendor/doctrine/common/lib/Doctrine/Common/Annotations/FileCacheReader.php line 186) {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\ContextErrorException: Warning: file_put_contents(/var/www/sites/my-website/app/cache/dev/annotations/My-Bundle-Entity-MyEntityTranslation.cache.php): failed to open stream: No such file or directory in /var/www/sites/my-website/vendor/doctrine/common/lib/Doctrine/Common/Annotations/FileCacheReader.php line 186 at /var/www/sites/my-website/vendor/doctrine/common/lib/Doctrine/Common/Annotations/FileCacheReader.php:186)"}

Both commands work well from the command line. I’m using Symfony 2.3.3 and CoreSphereConsoleBundle 0.1.0.

About this issue

  • Original URL
  • State: open
  • Created 11 years ago
  • Comments: 15 (7 by maintainers)

Most upvoted comments

Try running it like this: cache:clear --no-warmup

This works for me.