lang/php5 fails in apxs

Christopher Cowart ccowart at rescomp.berkeley.edu
Mon May 5 22:13:48 UTC 2008


Hello,

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

    %%APACHE%%@exec %D/sbin/apxs -e -a -n %%AP_NAME%% %f
    %%APACHE%%@unexec %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
"feature."

-- 
Chris Cowart
Network Technical Lead
Network & Infrastructure Services, RSSP-IT
UC Berkeley
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 825 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20080505/d8f83638/attachment.pgp


More information about the freebsd-questions mailing list