php - Unable to write cache file
I have a problem on a project that i took back.
There is a problem with the right ( i think ) forwww-data
; I'm on a sf 2.0 project and the error comes too on other (working and in production ) website..
So i followed the official symfony docs: http://symfony.com/doc/2.0/book/installation.html
The three solutions have been tried with success, the setfacl are working, but there is still the error when i'm trying to clear the cache.
The project is working, and there is no problem with it on the server.
Even theumask(0000)
still does nothing !
I really don't know where and what to find.. Any help ?
Answer
Solution:
Well, here is the solution:
I don't understand the -3 but ok. As i said, i search for the solution, and follow the documentation here: http://symfony.com/doc/2.0/book/installation.html
www-data
had the rights but i still getting the error.I deployed the project again and i did
php app/check.php
Then i got this error:
Then
Then i gave a value to
date.timezone
and all worked fine with a newphp app/check.php
Problem solved !
Answer
Solution:
Make sure the Apache user in your system is called
www-data
. If it has any other name likewww
orapache
, change permissions withsetfacl
orchmod +a
accordingly.Also, delete
app/cache
andapp/logs
folders content manually with the following command: