Twig cache permissions for Apache + cron on CentOS

I probably should have seen this coming, but when introducing Twig to a non-Symfony project, it hadn’t occurred to me to expect the same permissions dance that Symfony cover helpfully in their setup guide.

Having built a shiny new system that uses the same template cache for web requests (handled by the Apache user) and emailed reports (handled by another user via cron / command-line invocation), of course I hit exactly the same problem that those steps avoid. If you share any templates across the two users’ remits, eventually one will want to write to an existing cache file generated by the other user. It won’t have write permission, and Twig will freak out:

Continue reading

Facebook + Cordova + AngularJS encapsulation is no more?

Just a quick update following my previous post about using this Cordova Facebook plugin neatly with Cordova & AngularJS: unfortunately it seems EasyFB no longer supports the plugin because the plugin’s creators have decided to change the API and drop the previous transparent compatibility with Facebook’s JS SDK.
Continue reading