The code is postinst is correct. This should switch to prefork when a2query -M returns anything else then prefork or itk:
mpm=$(a2query -M) case "$(a2query -M)" in prefork|itk) return 0;; *) if apache2_switch_mpm prefork; then return 0; fi;; esac Could you check your apt.log for: ERROR: $PHP_MODULE module already enabled, not enabling PHP @PHP_VERSION@ or ERROR: Could not switch to prefork MPM, not enabling PHP @PHP_VERSION@ ? Cheers, -- Ondřej Surý <ond...@sury.org> Knot DNS (https://www.knot-dns.cz/) – a high-performance DNS server Knot Resolver (https://www.knot-resolver.cz/) – secure, privacy-aware, fast DNS(SEC) resolver Vše pro chleba (https://vseprochleba.cz) – Potřeby pro pečení chleba všeho druhu On Thu, May 19, 2016, at 04:47, Chris Knadle wrote: > I have a patch to switch mlmmj to use PHP 7.0 instead of PHP 5 (that > change > is trivial -- literally php5 -> php), but I'm running into a snag testing > the resulting binary packages: trying to load Apache2 with PHP 7.0 fails > to > start with the error message: > > "Apache is running as threaded MPM, but your PHP module is not compiled > to be threadsafe. You need to recompile PHP." > > and looking at the README.Debian.gz for libapache2-mod-php7.0, the > document > only discusses PHP 5. :-/ I'm having a look at the php7.0 source > package... libapache2-mod-php.postinst.extra seems to test for mpm but > I'm > suspecting that this needs tweaking for how Apache2 is currently packaged > in > Sid. ('a2query -M' returns 'event' which is not a case that's being > looked > for, and Apache2 isn't split into mpm/prefork packages anymore.) > > -- Chris > > -- > Chris Knadle > chris.kna...@coredump.us > > > Email had 1 attachment: > + signature.asc > 1k (application/pgp-signature)