apxs failure regarding httpd.conf and LoadModule

Bug #500703 reported by Daniel Convissor on 2009-12-27
This bug affects 2 people
Affects Status Importance Assigned to Milestone
apache2 (Ubuntu)

Bug Description

Binary package hint: apache2

I am building PHP 5.3.2RC1 from source on Ubuntu 9.10 Server Edition. My apache2-mpm-prefork package is at version 2.2.12-1ubuntu2.1. The "make install" step produces the following output:

    Installing PHP SAPI module: apache2handler
    /usr/share/apache2/build/instdso.sh SH_LIBTOOL='/usr/share/apr-1.0/build/libtool' libphp5.la /usr/lib/apache2/modules
    /usr/share/apr-1.0/build/libtool --mode=install cp libphp5.la /usr/lib/apache2/modules/
    libtool: install: cp .libs/libphp5.so /usr/lib/apache2/modules/libphp5.so
    libtool: install: cp .libs/libphp5.lai /usr/lib/apache2/modules/libphp5.la
    libtool: install: warning: remember to run `libtool --finish /data/wd/phpinstall/libs'
    chmod 644 /usr/lib/apache2/modules/libphp5.so
    apxs:Error: Activation failed for custom /etc/apache2/httpd.conf file..
    apxs:Error: At least one `LoadModule' directive already has to exist..
    make: *** [install-sapi] Error 1

Bug 1) Shouldn't Ubuntu's version of apxs be patched to put directives in files in the /etc/apache2/mods-available directory just like the php5 package does?

Bug 2) The workaround of adding a bogus "LoadModule" line in httpd.conf (as suggested in http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=231134) does not change the matter.

Related branches

Chuck Short (zulcss) wrote :

We'll get this fixed for lucid.


Changed in apache2 (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Daniel Convissor (convissor) wrote :

Until this gets fixed, people reading this may want to know how to work around the issue...

Edit /etc/apache2/mods-available/php5.load and add:

LoadModule php5_module /usr/lib/apache2/modules/libphp5.so

Edit /etc/apache2/mods-available/php5.conf and put in:

<IfModule mod_php5.c>
  AddType application/x-httpd-php .php
  AddType application/x-httpd-php-source .phps

During the make install step, use the -k flag. The -k flag means “keep going when some targets can't be made.” The output will still show the apxs error, but the installation should work. Do keep an eye out for other compile errors.

make install -k

Then enable the php5 module and restart Apache:

a2enmod php5
/etc/init.d/apache2 restart

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apache2 - 2.2.14-5ubuntu1

apache2 (2.2.14-5ubuntu1) lucid; urgency=low

  * Merge from debian testing. Remaining changes: LP: #506862
    - debian/{control, rules}: Enable PIE hardening.
    - debian/{control, rules, apache2.2-common.ufw.profile}: Add ufw profiles.
    - debian/control: Add bzr tag and point it to our tree.

apache2 (2.2.14-5) unstable; urgency=low

  * Security: Further mitigation for the TLS renegotation attack
    (CVE-2009-3555): Disable keep-alive if parts of the next request have
    already been received when doing a renegotiation. This defends against
    some request splicing attacks.
  * Print a useful error message if 'apache2ctl status' fails. Add a comment
    to /etc/apache2/envvars on how to change the options for www-browser.
    Closes: #561496, #272069
  * Improve function to detect apache2 pid in init-script (closes: #562583).
  * Add hint README.Debian on how to pass auth info to CGI scripts.
    Closes: #483219
  * Re-introduce objcopy magic to avoid dangling symlinks to the debug info
    in the mpm packages. Closes: #563278
  * Make apxs2 use a2enmod and /etc/apache2/mods-available. Closes: #470178,
    LP: #500703
  * Point to README.backtrace in apache2-dbg's description.
  * Use more debhelper functions to simplify debian/rules.
  * Add misc-depends to various packages to make lintian happy.
  * Change build-dep from libcap2-dev to libcap-dev because of package rename.
 -- Bhavani Shankar <email address hidden> Wed, 13 Jan 2010 14:28:41 +0530

Changed in apache2 (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers