3

I'm using Wordpress, but then it stopped working. I then firgured out that it had something to do with apache2. I got that working but now when I get to the webpage, instead of executing the php file, I get the code. I tried re-installing the php apache2 module, but got this:

Preparing to unpack .../libapache2-mod-php7.2_7.2.10-0ubuntu0.18.04.1_amd64.deb ... Unpacking libapache2-mod-php7.2 (7.2.10-0ubuntu0.18.04.1) over (7.2.10-0ubuntu0.18.04.1) ... Setting up libapache2-mod-php7.2 (7.2.10-0ubuntu0.18.04.1) ... Module mpm_event disabled. Enabling module mpm_prefork. apache2_switch_mpm Switch to prefork dpkg: error processing package libapache2-mod-php7.2 (--configure): installed libapache2-mod-php7.2 package post-installation script subprocess returned error exit status 1 E: Sub-process /usr/bin/dpkg returned an error code (1)

3
  • 1
    Please run sudo dpkg --configure -a and paste the output into your question.
    – Jos
    Jan 28, 2019 at 22:47
  • 5
    I have fixed the problem and it is working. All i did was sudo apt remove --purge libapache2-mod-php7.2 and then sudo apt install libapache-mod-php*.
    – Larry
    Jan 29, 2019 at 15:00
  • 1
    Nice one Larry, make this an answer so people can upvote May 22, 2019 at 9:10

1 Answer 1

9

It work for me same - sudo apt remove --purge libapache2-mod-php7.2 and then sudo apt install libapache2-mod-php*

1
  • Same happened to me for libapache2-mod-php7.4 and purging also works.
    – bfrguci
    Mar 5, 2022 at 0:00

You must log in to answer this question.

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