Score:0

Cannot enable php7.4 on Ubuntu 20.04

at flag

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.

Kyle H avatar
cn flag
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
Score:1
cn flag

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.

Score:1
in flag

The error message is:

Module mpm_event is enabled

you are trying to disable the wrong module.

a2dismod mpm_event
Kyle H avatar
cn flag
this will break. did when i ran it. they you have to switch php versions to 8 to get it working again anyways
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.