At work, I’m forced to use a Windows XP machine largely because eBay’s addicted to Outlook, but also because that’s the type of thing you need to do to play nice within a big company. However, that doesn’t mean I can’t route around this pain, so I installed VMWare and loaded up Suse Linux 9.1 in a virtual machine. Now I can hack on PHP in a somewhat familiar environment.
I say “somewhat” because this is my first time using Suse. I used to run Red Hat and then I moved to Mac OS X on my home machine, so it’s taking me a little bit of time to get used to Suse. (I picked Suse because my boss has a copy of the Suse CDs lying around and I decided it was easier to install from CDs than over the Internet.)
For one, Suse has a package for Apache 2.0, but not for Apache 1.3, which is a first for me. Also, Suse has organized its httpd.conf file in such a way that all the master file does is Include a variety of specialized child configuration files. Unfortuntately, this breaks the PHP install process.
When you run PHP’s make install command, it kicks off a request to apxs2 to handle the Apache 2.0 specific stuff. apxs2 loads in your httpd.conf file and looks for a LoadModule directive, so it knows how it should format the line it should add to httpd.conf to enable PHP.
However, apxs2 only slurps in the master file. It doesn’t resolve any of the Includes, so it can’t find any LoadModule lines. This triggers an error, it dies, and as a result, PHP aborts the install.
I reported this as an Apache bug, but it was closed with a status of “Won’t Fix” because they don’t want reimplement the parser inside of apxs2.
From looking at the apxs2 code, I see there is a simple work around, which is to put a commented out LoadModule directive in the master file. apxs2 allows you to fool it into thinking it’s found a valid line, and you can go from there. You still need to fix up your configuration file, but at least the install doesn’t die.
However, when I tried to report this back to Suse, I was totally defeated. I could find no place anywhere on their Web site to access a bug database. Hum… That seems to defeat the notion of open source as a environment for parallel debugging. Oh well.
So I’ll blog it and hope that someone who Googles for “At least one LoadModule Directive already has to exist” will find this.
PS: Some further searching has uncovered that Debian was also affected by this issue. I don’t know it they’ve fixed it, however.
Popularity: 100% [?]