PHP 5.0.4 pooched my web server
I run a web server (Apache 2.1.x) at work which is the collaboration system for the developers. It provides a Subversion repository and a WebDAV volume we stick shared files onto, etc.
We figure a Wiki will be a cool addition (and, in fact, it really is) so I install PHP 5.0.4 and dokuwiki. While I'm at it, I upgrade from Apache 2.1.1 to 2.1.4 (upgraded APR also), and Subversion from 1.1.4 to 1.2-rc2.
It's all great, the Wiki is awesome (mad props to dokuwiki, it's simple to use and looks nice right out of the box), people are adding to the wiki, yay.
Sometime later, people start complaining that Subversion commits are failing due to some strange permissions error from the server. I look into it and the transactions directory in the repository DB (I'm using FSFS) has directories in it with mode 666 (-rw-rw-rw-). After creating these directories without the execute bit set, it fails to access the files within them and produces this error.
So now I'm wondering what kind of bug Subversion 1.2-rc2 has that wasn't in 1.1.4. I briefly has 1.2.-rc1 installed and it didn't have this problem, so maybe it's a new bug. The Subversion folks weren't biting, since no other such bugs had been reported. Then backing out to Subversion 1.1.4 still had the problem. I'm befuddled. It seems like maybe a umask problem, but it's intermittent, so it's happening in the httpd process. Argh!
We later discover that this problem isn't limited to Subversion. Users of the WebDAV volume are starting to see this issue with newly created files and directories (both cases mode 666, where the usual modes are 755 and 644). It's really not looking like a Subversion bug.
So now I'm building and installing all manner of versions of APR, httpd, and Subversion, trying to isolate this problem to some version of something, and I'm still stumped. I even went as far as to go back to APR 0.9.5, and httpd 2.0.x, older versions than what I had originally, just to have the canonical supported Subversion setup. The only version that I can get to work is the binaries I had from before (which I had cleverly backed up), but that didn't include PHP, which I needed for the WIki.
And then it dawned on me that the other thing I changed was adding PHP to the mix. So I disabled the PHP module and waited. Sure enough, a day later, there have been no permissions problems reported. (Though plenty of "Hey why's the Wiki busted?")
So it appears that PHP 5.0.4 does some strange thing that alters the file mode of files created by httpd to the number of the beast. I won't read too far into that, but I'm going to try PHP 4.3.11, which should be fine for dokuwiki, and see how that fares.
Moral of the story: don't change everything at once. Yes, I've already learned this moral many times.
I am now an Uncle to a very little boy named Matthew. He's pretty OK. You can kind of already tell we're related…