libapache2-mod-php7.2 Not working

17,080

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

Share:
17,080

Related videos on Youtube

Larry
Author by

Larry

Updated on September 18, 2022

Comments

  • Larry
    Larry almost 2 years

    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)

    • Jos
      Jos over 5 years
      Please run sudo dpkg --configure -a and paste the output into your question.
    • Larry
      Larry over 5 years
      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*.
    • Barney Chambers
      Barney Chambers about 5 years
      Nice one Larry, make this an answer so people can upvote
  • bfrguci
    bfrguci over 2 years
    Same happened to me for libapache2-mod-php7.4 and purging also works.