0

I'm trying to set up nextcloud on a home ubuntu box.

I've got php 7.4 installed, apache, etc.

However apache2ctl -M does not show php as shared. This causes (I guess) the http://localhost/nextcloud setup GUI to render as raw php code in the browser.

When I try to do a2enmod php7.4 I get:

Considering dependency mpm_prefork for php7.4:
Considering conflict mpm_event for mpm_prefork:
ERROR: Module mpm_event is enabled - cannot proceed due to conflicts.  It needs to be disabled first!
Considering conflict mpm_worker for mpm_prefork:
ERROR: Could not enable dependency mpm_prefork for php7.4, aborting

When i attempt to a2dismod mpm_worker or mpm_prefork it says

Module mpm_prefork already disabled

This is a new install, no previous versions of PHP, etc. I've gone pretty slowly and methodically through the nextcloud docs which seemed to work until I ran into this. I'm also pretty new so if there's any config files I need to edit please let me know their paths.

1
  • Hey i saw this was posted 8 days ago and im working on the same issue, Ive dug into the apache config and it seems that php7.4.load and php7.4.conf files are missing even though dpkg says the libapache2-mod-php7.4 (the package to install to get php7.4 working for apache2) package is installed and should provide two files that it is not providing on install. Im going to work on it a bit more, but I have gotten it to work just using php8.0 instead so you may want to explore installing that to get your instance working
    – Kyle H
    Commented Jul 15, 2021 at 23:04

3 Answers 3

1

Wipe your server (if possible) and use the provided vm scripts from Nextcloud at this link. I was also able to get my own instance going by using php 8.0 instead of 7.4. Docker and snap packages are also available that I can get going.

1

The error message is:

Module mpm_event is enabled

you are trying to disable the wrong module.

a2dismod mpm_event
1
  • this will break. did when i ran it. they you have to switch php versions to 8 to get it working again anyways
    – Kyle H
    Commented Jul 19, 2021 at 15:10
0

This steps fixed my same problem after ubuntu version upgrade from 18.04 to 22.04

sudo a2dismod mpm_prefork

System give you output that say you can't disable it because you have enabled php7.4(in my case) disable it

sudo a2dismod php7.4

check your actual php version

php -v

enable actual php version if you not already did this (in my case 8.1)

sudo a2enmod php8.1

restart apache

sudo systemctl restart apache2

Thanks Gerald Schneider for reply that not fix my same problem but helps. And cdehaan from this thread https://stackoverflow.com/questions/70639121/php7-4-in-ubuntu-21-10-apache2-fails-to-start

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .