{"action":"created","issue":{"url":"https://api.github.com/repos/symfony/symfony-demo/issues/281","repository_url":"https://api.github.com/repos/symfony/symfony-demo","labels_url":"https://api.github.com/repos/symfony/symfony-demo/issues/281/labels{/name}","comments_url":"https://api.github.com/repos/symfony/symfony-demo/issues/281/comments","events_url":"https://api.github.com/repos/symfony/symfony-demo/issues/281/events","html_url":"https://github.com/symfony/symfony-demo/issues/281","id":122870849,"number":281,"title":"Getting HTMLPurifier warnings","user":{"login":"lfjeff","id":3720086,"avatar_url":"https://avatars.githubusercontent.com/u/3720086?v=3","gravatar_id":"","url":"https://api.github.com/users/lfjeff","html_url":"https://github.com/lfjeff","followers_url":"https://api.github.com/users/lfjeff/followers","following_url":"https://api.github.com/users/lfjeff/following{/other_user}","gists_url":"https://api.github.com/users/lfjeff/gists{/gist_id}","starred_url":"https://api.github.com/users/lfjeff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lfjeff/subscriptions","organizations_url":"https://api.github.com/users/lfjeff/orgs","repos_url":"https://api.github.com/users/lfjeff/repos","events_url":"https://api.github.com/users/lfjeff/events{/privacy}","received_events_url":"https://api.github.com/users/lfjeff/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/symfony/symfony-demo/labels/bug","name":"bug","color":"e11d21"},{"url":"https://api.github.com/repos/symfony/symfony-demo/labels/hasPR","name":"hasPR","color":"006b75"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-12-18T03:20:31Z","updated_at":"2016-03-17T15:12:55Z","closed_at":"2015-12-21T14:48:09Z","body":"I am getting these warnings in the error log:\r\n\r\n```\r\n[Thu Dec 17 20:00:37 2015] [error] [client 24.251.53.52] PHP Warning:  Directory \r\n/home/mydir/symfony_demo/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer \r\nnot writable, please chmod to 775 in \r\n/home/mydir/symfony_demo/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer.php on line 278,\r\n```\r\n\r\nIt appears that the demo is using the HTMLPurifier package instead of the HTMLPurifier Bundle.  If the bundle was used, it should be possible to configure things to set up the cache directory in a better location (not in vendor subdirectory).  See https://github.com/Exercise/HTMLPurifierBundle for details."},"comment":{"url":"https://api.github.com/repos/symfony/symfony-demo/issues/comments/197926606","html_url":"https://github.com/symfony/symfony-demo/issues/281#issuecomment-197926606","issue_url":"https://api.github.com/repos/symfony/symfony-demo/issues/281","id":197926606,"user":{"login":"stof","id":439401,"avatar_url":"https://avatars.githubusercontent.com/u/439401?v=3","gravatar_id":"","url":"https://api.github.com/users/stof","html_url":"https://github.com/stof","followers_url":"https://api.github.com/users/stof/followers","following_url":"https://api.github.com/users/stof/following{/other_user}","gists_url":"https://api.github.com/users/stof/gists{/gist_id}","starred_url":"https://api.github.com/users/stof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stof/subscriptions","organizations_url":"https://api.github.com/users/stof/orgs","repos_url":"https://api.github.com/users/stof/repos","events_url":"https://api.github.com/users/stof/events{/privacy}","received_events_url":"https://api.github.com/users/stof/received_events","type":"User","site_admin":false},"created_at":"2016-03-17T15:12:55Z","updated_at":"2016-03-17T15:12:55Z","body":"@javiereguiluz here is what I have in my config at work to fix this issue (requires HtmlPurifier 4.7+ to work though):\r\n\r\n```yaml\r\nexercise_html_purifier:\r\n    default:\r\n        Cache.SerializerPermissions: 0775\r\n```\r\n\r\nThe default value in HtmlPurifier is ``0755``, but ACLs are masked by the group permission, so the cache must be group-writable to be writable by both the CLI and Apache when using ACLs.\r\n\r\nThe demo uses the library directly rather than using the Exercise bundle, but this would not forbid to configure the cache permissions too. It would be a better fix than disabling the cache entirely."}}