deis/heroku-buildpack-php — pull request #1 by Xe (2014-08-07 20:53:21+00:00)
Title: Fix permissions issue with domain socket

This fix is deis-specific.

Use root for php-fpm to work around a PHP-specific issue when using nginx/apache to server PHP apps in deis. The permissions of the fastcgi domain socket are incorrect (760 instead of 766 or 777 like they should be) and php-fpm / apache / nginx both do the Correct Thing and drop elevated permissions as soon as they can. However, dropping when they do you get a permission error akin to:

[proxy:error] [pid 79:tid 140349649442560] (13)Permission denied: AH02454:
FCGI: attempt to connect to Unix domain socket /tmp/heroku.fcgi.5000.sock (heroku-fcgi) failed

This commit addresses this issue and fixes the PHP buildpack to work inside deis.