RuntimeException in ClassCollectionLoader.php line 239:
Failed to write cache file "/var/www/fareast/app/cache/dev/classes.php".
I have this error when I run my project in symfony2. I have nginx as my web server and centOS 7 as my OS. I tried deleting the cache folder manually and by
php app/console cache:clear
then I did a bad practice to app/cache and app/logs
chmod -R 777
but I have the same error. /var/log/nginx/error.log is also empty. Do you recommend other solutions? Or do I have to install some php5 libraries for cache?
In symfony3 i've faced the same issue...
So, problem would not solve only using "cache clear"
You have to change (R/W)permission of cache folder in your project
Now refresh...
If still issue is coming, change(R/W)permission of logs folder in your project
You have to use the following script to determine your web server user and grant the needed permissions:
Setting 777 permissions do nothing, because when webserver user write folders to it, the folders belong to this user, and you, as command line user haven't access to them, and vice versa. Set permissions in correct way: http://symfony.com/doc/current/book/installation.html#book-installation-permissions