i installed the sonata admin bundle. After installation i refresh my page there is the cache problem then i use
rm -rf app/cache app/log
for remove the cache.then i also create the director using the command
mkdir app/cache app/log
then i got the new problem like this
Runtime Exception : Unable to create the cache directory (/var/www/sonata/app/cache/dev). Please help .
I solved it changing user and group of folder
var/cache
andvar/logs
, then I cleaned cache:Also check the path. In my case, I had
return dirname(__DIR__) . '../../../../var/cache/
instead of
return dirname(__DIR__) . '/../../../../var/cache/
(missing/
)It is mostly the permission issue.
I have got resolved it on MAC using command:
$ sudo chmod -R 777 <path/to/cache/directory>
You might try:
$ sudo chmod -R 777 /var/www/sonata/app/cache
I found a similar problem when I was using the PHP symfony as the error picture. I found it after running command