DokuWiki calls umask() in several places. This is problematic because it sets the umask for the entire Apache process, and it's not the only application running in Apache. In my particular case, installing DokuWiki on an Apache instance that is also running Subversion eventually ends up pooching my Subversion repository.
For a long time I've blamed PHP: http://www.wsanchez.net/blog/archives/000100.html
And I still do, because it really shouldn't give you API to call umask(). A better option is to call open() with the proper mode mask when you create new files, which does not alter the state of the entire process.