I stumbled across this behavior roughly a year ago. The php5 port has
the following lines in the pkg-plist:

    [EMAIL PROTECTED] %D/sbin/apxs -e -a -n %%AP_NAME%% %f
    [EMAIL PROTECTED] %D/sbin/apxs -e -A -n %%AP_NAME%% %f

This command reads /usr/local/etc/apache22/httpd.conf, looks for
LoadModule lines, appends a LoadModule for php5, and exits. I don't have
any LoadModule lines in my httpd.conf; they've all been separated out
into include files.

The result is the port fails to install:

| apxs:Error: Activation failed for custom
| /usr/local/etc/apache22/httpd.conf file..
| apxs:Error: At least one `LoadModule' directive already has to exist..
| pkg_add: command '/usr/local/sbin/apxs -e -a -n php5 libphp5.so' failed
| --->  Removing old package'
| ** Fix the installation problem and try again.

Needless to say, this is annoying. I have to remember to add a
"LoadModule foo foo.so" line to the httpd.conf whenever I upgrade php5,
and remove both it and the PHP LoadModule directive when I'm done.

Why does the port think it's kosher to touch live configuration files? A
lot of people keep their configurations under revision control (and most
probably should). On the next commit on my system, this change is gone
anyways. Does anyone have any decent work arounds? Better yet, is there
any interest in fixing the php5 port so that it doesn't touch
configuration files? At the very least, I'd love a knob to disable the

Chris Cowart
Network Technical Lead
Network & Infrastructure Services, RSSP-IT
UC Berkeley

Attachment: pgpKoAwIlilXW.pgp
Description: PGP signature

Reply via email to